Redirecting if JavaScript is turned off

P

Peter

I have a modest website that uses a lot of Javascript.

If anybody views the site and does not have Javascript enabled I want to
politely redirect them to another page, so I put this bit of code in my
<head> section :

<script type="text/javascript"
language="JavaScript">document.write("<!"+"--")</script>
<meta http-equiv="Refresh" content="0; URL=noscript.html">
<!--//-->

So far so good.
It appears to work, *and* it passes the the 'W3C MarkUp Validation Service'
test ( http://validator.w3.org/ ).

Now the bad Google doesn't index my site any more, presumably because
their crawler always gets redirected.

Does anybody have a solution to this dilema, please?
Redirecting to a 'with-script' page is not an option because my page is
linked-to by many other sites.
 
E

Evertjan.

Peter wrote on 28 feb 2004 in comp.lang.javascript:
If anybody views the site and does not have Javascript enabled I want
to politely redirect them to another page, so I put this bit of code
in my <head> section :

<script type="text/javascript"
language="JavaScript">document.write("<!"+"--")</script>
<meta http-equiv="Refresh" content="0; URL=noscript.html">
<!--//-->

Try doing it the other way around:

Start with the no javascript file and clientside-js-redirect
to the yes javascript page.
Now the bad Google doesn't index my site any more, presumably
because their crawler always gets redirected.

This can best be done serverside:

if the IP is in the google range, redirect
 
E

Evertjan.

Randy Webb wrote on 01 mrt 2004 in comp.lang.javascript:
Oooooooooops :)

FAQ remains that all Google© pages are displayed upside down over there.

Or so I have heared.
 
O

optimistx

Don said:
No Evertjan !
But the code runs backwards.
Regards
Don
I am trying to make an Australian version of my page. Upside down is no
problem, but trying to implement backwards execution of scripts I have
some assumably small problems. Although 'goto' does not exist in
Javascript I feel the need to implement 'comefrom'.Do I need
write-only-memory (wom)? Any ideas?
 
E

Evertjan.

optimistx wrote on 02 mrt 2004 in comp.lang.javascript:
I am trying to make an Australian version of my page. Upside down is no
problem, but trying to implement backwards execution of scripts I have
some assumably small problems. Although 'goto' does not exist in
Javascript I feel the need to implement 'comefrom'.Do I need
write-only-memory (wom)? Any ideas?

Make a Wom-batch file following the Swagman protocol:

Do 'til his billy boiled
Camp by a billabong.
If not under the shade of a coolibah tree then
Exit down under
Else
Play <http://tinyurl.com/3fvnq>
End If
Loop
 
D

Don Grover

Actually are you aware that on most motherboards the inbuilt video cards can
turn the screen upside down, an ozzie invention saves us turning monitor
upside down.
And for all these years I have been thinking the swivilling flat bit on the
top of the monitor was for books.
Don
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top