Re: [PHP] Re: A Little Something.
[email protected] (Peter Ford)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
Stut wrote: > On 12 May 2008, at 09:39, Peter Ford wrote: >> tedd wrote: >>> Hi gang: >>> This is what I did this morning: >>> http://webbytedd.com/bb/tribute/ >>> It speaks for itself. >>> Cheers, >>> tedd >> >> tedd, >> >> Nothing to do with the subject matter, but I noticed because it is one >> of your more simple pages: I get a JS "urchinTracker() not defined" >> error on your site, almost certainly because NoScript is blocking >> UrchinTracker... >> >> Perhaps you should wrap that naked call to urchinTracker() in a >> conditional - maybe as simple as >> >> if (urchinTracker) urchinTracker(); >> >> <pet-peeve> >> I really hate seeing JS errors on published sites (i.e. not >> development sandboxes) >> </pet-peeve> >> >> 'course, there are many sites that make the same call to >> urchinTracker(), and many many worse errors... > > I see your pet peeve and I'll raise you one of mine... > > <pet-peeve> > People who use Javascript blockers, especially Javascript blockers that > do a half-arsed job which causes errors. > </pet-peeve> > > If you're going to block Javascript, block it. Don't use something that > tries (and apparently fails) to block it intelligently. > > What are you so afraid of? > > -Stut > Your pet peeve seems to be a rather thinly veiled personal attack - I tried to be clear to tedd that my comment was not personal, but highlighted by his page. Javascript is a very powerful but rather blunt instrument, and I prefer to be judicious in my use of power. NoScript is not causing the error. The absence of UrchinTracker is causing the error. I choose not to allow UrchinTracker into my system. NoScript is certainly not doing a half-arsed job - it's working perfectly, unless you think I should suffer extra CPU cycles while the browser parses every line of Javascript to see what will happen before running it. That would be a job for a compiler, rather than a scripting engine. What I'm most "afraid" of are assumptions that something I didn't ask for exists in the environment I use to work in. If a page features a message that says "we use Urchin Tracker to (...whatever it is that Urchin Tracker does...) and you may see errors if you block it", then I can understand. What I also am "afraid" of is that I don't know everything that I should be afraid of - using NoScript is a good way of giving me chance to research the stuff that is being pushed into my browser. Of course, in some cases I don't feel the need to research, and block unconditionally until I see a problem with that approach. A developer should not make assumptions about the existence of a feature in the target system - he should specify requirements and let the end-user decide if his product is acceptable, or check that a feature is present and work around it if not. I can even tolerate "This site requires Internet Explorer 5.3 or later" (as my credit card company does) if the providers are upfront about it... I don't consider being afraid as a weakness - but blasé indifference to danger can be a fatal weakness. -- Peter Ford phone: 01580 893333 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent