Forum Moderators: open

Message Too Old, No Replies

Validating counter script

         

Mohamed_E

4:19 pm on Mar 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



After making my files validate to Strict I found that the counter scripts that I use for statistics were badly invalid. There were no fewer tha four errors in the two lines of code inside the <noscript> tag! Fortunately all errors were reasonably easy to spot and fix:
  1. Under Strict the <noscript> element requires a block structure; fixed by adding a <P> at the start of it.
  2. The link to the script developer's site had a target="_blank" in it. I certainly would rather have it open in a separate window. I removed it for two reasons: It is in the <noscript> section, so few people will get it, and in any case I expect few people to click on that link.
  3. The <img> tag had a border=0, I removed it.
  4. Finally, the <img> had no alt, this is invalid even under Transitional. Since it had a title, I replaced title with alt.

The TOS do not allow me to modify their script in any way, but I very much hope that these minor modifications will not make them interrupt my service.

g1smd

5:20 pm on Mar 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have been doing simple modifications to counter scripts to make them validate, for many years, and have never had a problem with doing that.

I think that by "modify" they actually don't want you to mess about with the parameters that the script passes back to their server. Many counter scripts sniff the referrer, browser, OS, resolution, and a whole load of other stuff.

You could modify the script to falsely claim that all your visitors use Mozilla for example. That sort of change would get you canned.

Making a change, to validate the code is unlikely to cause you a problem. However, I would send the counter script author (as a "concerned surfer", and using some anonymous "throw-away" email address, from a different IP address to your normal one) a note to say what needs to be changed.