renyard / validity

A Google Chrome extension for validating HTML.
https://chrome.google.com/webstore/detail/bbicmjjbohdfglopkidebfccilipgeif
Apache License 2.0
90 stars 22 forks source link

Validator causes two requests to be sent to the server #19

Open corinnaerin opened 12 years ago

corinnaerin commented 12 years ago

My development is done using Struts to interface between Java and HTML, and I noticed after I installed the plugin that, for some reason, the Action was being executed twice when the page loads, although the second request to the server does not show up in Chrome developer tools, and the page does not reload. Needless to say, this causes issues. I had to disable the plugin.

lukearmstrong commented 10 years ago

Just noticed this too.

Had a simple counter that I incremented on each request. Each time I refreshed it would increment twice, was driving me mad until I realised that this extension could be doing it.

I assumed this validator tool just submitted the source of the page to the W3C validator and then showed the results. Not sure why it needs to request the page twice. It isn't the W3C validator validating by URL because I am developing locally, so it wouldn't be able to access the page.

renyard commented 10 years ago

When the extension was first written, there was no way of obtaining the source for a document without making another request. The devtools.network API may be able to be used for this now and should be investigated: https://developer.chrome.com/extensions/devtools_network

Investigation notes:

nusphere commented 1 year ago

something happens to this issue?

Unfortunately, the plugin causes the request to be triggered again after the "page" has been loaded. Unfortunately, this causes duplicate log entries or changes session-based behavior. (keyword csrf or hidden secrets generations)

It was very time-consuming to attribute it to this tool. As a consequence, you would have to deactivate the plugin, as it can certainly lead to side effects. Not only in local development, but also on other websites where the tool may be activated.