Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating two page requests #1

Open
gekkstah opened this issue May 31, 2013 · 6 comments
Open

Generating two page requests #1

gekkstah opened this issue May 31, 2013 · 6 comments

Comments

@gekkstah
Copy link

Hey,

When having your plugin running in Chrome, it doubles the number of document requests (proven in Fiddler2)-

This leads for example to placing the doubled amount of stuff in the shopping cart .
Or my online banking refuses some actions because Chrome fires 2 Document Requests per Pageload .

I tried to fork & fix this but my experience in Chrome extension is only slightly above zero.

My suggestion would be to use a contentscript to fish the document.innerHTML rather than doing an additional request.

Cheers
Bjoern

@pmeenan
Copy link
Owner

pmeenan commented May 31, 2013

The extension relies on being able to get the raw, original HTML in
order to avoid script tags that were asynchronously injected into the
page. It shouldn't be doubling-up on POST requests though, only pages
that were served using a GET. I'll see if I can add a way to
selectively disable the extension with some options.

On 5/31/2013 11:25 AM, Bjoern wrote:

Hey,

When having your plugin running in Chrome, it doubles the number of
document requests (proven in Fiddler2)-

This leads for example to placing the doubled amount of stuff in the
shopping cart .
Or my online banking refuses some actions because Chrome fires 2
Document Requests per Pageload .

I tried to fork & fix this but my experience in Chrome extension is
only slightly above zero.

My suggestion would be to use a contentscript to fish the
document.innerHTML rather than doing an additional request.

Cheers
Bjoern


Reply to this email directly or view it on GitHub
#1.

@gekkstah
Copy link
Author

Ok.
Just to give you an example:
http://www.otto.de/LG-Optimus-L3-E400-Smartphone/shop-de_dpip_AKL10015490859/?expId=4001&ArticleRef=62495295&articleback=true#lmPromo=la,1,hk,sh22804033,fl,apeADS_slot1_0_24

The red button on the right handside makes Chrome put two of that kind into my shopping cart.

@michaelhodgins
Copy link

I know this is an old issue, but this is happening for me. I'm a web developer, and I can definitely see two requests hitting my development server while I have Spof-o-matic enabled.

@pmeenan
Copy link
Owner

pmeenan commented Apr 15, 2015

Do you see 2 POST's or just double GET's? The double GETs are expected because that's the only way for the extension to get the original HTML (sadly the extension API doesn't provide access to the response body for requests).

@michaelhodgins
Copy link

I believe it's just GETs. So you can't do the analysis on the DOM and you need the original HTML string? That's a shame. Spof-o-matic is useful, but it looks like I'll have to enable it only when I specifically need to use it. At least this has solved a mystery for me; I really couldn't understand why my server debugger was running twice each time I refreshed Chrome.

@pmeenan
Copy link
Owner

pmeenan commented Apr 15, 2015

Correct. The DOM includes script tags that were dynamically injected which are non-blocking and SPOF-O-Matic needs to be able to detect parsed (blocking) tags from the original HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants