OK... to anyone who's implementing a page counter.... if you find that the counter is doubling up when a request from FireFox (under OSX/Linux/doze) it's because the browser is loading the page twice. It's also due to how the W3C spec is written... and the behavior is entirely correct (if not a bit annoying).
If a browser find an IMG with an empty SRC tag then it should reload the page once more to check. I had an empty IMG SRC which was then dynamically assigned to with JavaScript.
To resolve the problem I just put a temporary image in place... which will never be seen because the containing div is hidden until the Javascript makes it visible again... at which point the correct image will be assigned to it.
Done!
Wednesday, 14 May 2008
Subscribe to:
Post Comments (Atom)
1 comments:
It doesn't reload the page to check anything. It just tries to fetch an image and since the src attribute of the img tag is empty, it tries to use the page url for the image.
Post a Comment