Legitimate use of JavaScript

malte on 2004-01-14T13:53:43

If your site gets a significant amount of traffic through the search keywords "ass gallery" although your site doesnt show any asses, is this a legitimate use of JavaScript?

if(location.referer.indexOf("ass") && location.referer.indexOf("gallery"))
   location.href = "http://goatse.cx"


No...

merlyn on 2004-01-14T15:08:52

I'd handle that as a mod_rewrite rule with a redirect.

Yes and no

htoug on 2004-01-14T15:36:44

I'd say: Only if you can't do it as a mod_rewrite rule.

Fools who do things like that probably have ECMAscript enabled, so it should work! They would also be delighted by your redirection - what a "nice" site - I'm glad I hadn't just eaten!

Re:Yes and no

jordan on 2004-01-14T16:55:46

  • what a "nice" site - I'm glad I hadn't just eaten!

It's refreshing to see someone here who never reads comments on Slashdot! :-)

Search engine annoyances

gav on 2004-01-14T22:22:11

Over 30% of the hits to my website are for people searching for some combination of the words "rate", "my", and "rack". They're probably going to leave disappointed.