pmeenan / spof-o-matic

Chrome extension for detecting and simulating frontend Single Points Of Failure
28 stars 5 forks source link

Generating two page requests #1

Open gekkstah opened 11 years ago

gekkstah commented 11 years ago

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 commented 11 years ago

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 https://github.com/pmeenan/spof-o-matic/issues/1.

gekkstah commented 11 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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.