473,508 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirecting if JavaScript is turned off

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 news: 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.

Jul 20 '05 #1
11 1996
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 news: 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
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Peter wrote on 28 feb 2004 in comp.lang.javascript:
Now the bad news: 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


And when google find out that you are cloaking the site will be banned.

http://www.google.com.au/webmasters/2.html#A1 - bottom of the page.

Cheers
Richard.
Jul 20 '05 #3
Richard Formby wrote on 29 feb 2004 in comp.lang.javascript:

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Peter wrote on 28 feb 2004 in comp.lang.javascript:
> Now the bad news: 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


And when google find out that you are cloaking the site will be banned.

http://www.google.com.au/webmasters/2.html#A1 - bottom of the page.


Perhaps down under?

The above site wasn't googled anyway, so if the OP wants it, he has to
invent something to keep google on the page that the majority of the
visitors see.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #4
Evertjan. wrote:
Richard Formby wrote on 29 feb 2004 in comp.lang.javascript:

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Peter wrote on 28 feb 2004 in comp.lang.javascript:
Now the bad news: 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


And when google find out that you are cloaking the site will be banned.

http://www.google.com.au/webmasters/2.html#A1 - bottom of the page.

Perhaps down under?


http://www.google.com/webmasters/2.html#A1

Says the same thing. Only difference I saw in the two pages, at a quick
glance, was the .au in the address. The section the OP referred to was
verbatim.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 20 '05 #5
Randy Webb wrote on 29 feb 2004 in comp.lang.javascript:
Perhaps down under?


http://www.google.com/webmasters/2.html#A1

Says the same thing. Only difference I saw in the two pages, at a quick
glance, was the .au in the address. The section the OP referred to was
verbatim.


Hey, it was a joke !

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #6
Evertjan. wrote:
Randy Webb wrote on 29 feb 2004 in comp.lang.javascript:

Perhaps down under?


http://www.google.com/webmasters/2.html#A1

Says the same thing. Only difference I saw in the two pages, at a quick
glance, was the .au in the address. The section the OP referred to was
verbatim.

Hey, it was a joke !


Oooooooooops :)

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 20 '05 #7
Randy Webb wrote on 01 mrt 2004 in comp.lang.javascript:
Evertjan. wrote:
Randy Webb wrote on 29 feb 2004 in comp.lang.javascript:

Perhaps down under?

http://www.google.com/webmasters/2.html#A1

Says the same thing. Only difference I saw in the two pages, at a quick
glance, was the .au in the address. The section the OP referred to was
verbatim.

Hey, it was a joke !


Oooooooooops :)


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

Or so I have heared.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #8
No Evertjan !
But the code runs backwards.
Regards
Don
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Randy Webb wrote on 01 mrt 2004 in comp.lang.javascript:
Evertjan. wrote:
Randy Webb wrote on 29 feb 2004 in comp.lang.javascript:
>Perhaps down under?

http://www.google.com/webmasters/2.html#A1

Says the same thing. Only difference I saw in the two pages, at a quick
glance, was the .au in the address. The section the OP referred to was
verbatim.

Hey, it was a joke !


Oooooooooops :)


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

Or so I have heared.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 20 '05 #9
Don Grover wrote:
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?
Jul 20 '05 #10
optimistx wrote on 02 mrt 2004 in comp.lang.javascript:
Don Grover wrote:
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?


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

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #11
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

"optimistx" <op***********@hotmail.com> wrote in message
news:8j*************@read3.inet.fi...
Don Grover wrote:
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?

Jul 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
9400
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
111
14255
by: Retlak | last post by:
The recommended (on dozens of websites) and effective (works in Netscape, MSIE, Mozilla, probably others) way to detect if a browser has Javascript turned off is to put this in the <head>: ...
3
2312
by: lozd | last post by:
Would appreciate any solutions people could offer for this. Basically I wan't to use a frameset with an aspx page as the contents rather than a htm page and I'd like to be able to redirect the...
8
2991
by: Prometheus Research | last post by:
http://newyork.craigslist.org/eng/34043771.html We need a JavaScript component which will auto-submit a form after a set period has elapsed. The component must display a counter that dynamically...
1
2109
by: Greggory | last post by:
Hi all, when a client at my "C#/asp.net - page" has its javascript turned off, I want to redirect him to another page. This must be done by a javascript. Can I somehow autopost a page to...
7
21269
by: Privacy Advocate | last post by:
//crossposted to: comp.lang.javascript, alt.comp.lang.javascript in an effort to get factual answers from JavaScript experts// Simply put; Is it possible to obtain the real (actual) IP address of...
36
2154
by: Mark Rae | last post by:
Hi, Just had an interesting message from someone who was unable to view one of my sites because they have JavaScript turned off, and expecting me to re-write my site so that they could view...
1
1438
by: sreekeerthi | last post by:
hi friends...this is keerthi...i am doing a project where i want to redirect my page when ever the back button is clicked...for this i am using window.onbeforeunload method..and for page redirection...
5
1654
by: Avaenuha | last post by:
Okay. I'm coding a login function for an online security subject at uni. It's written in PHP5, on a Solaris server; I don't have permissions to alter or even access the php.ini file, I believe. ...
0
7226
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7125
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7049
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5631
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4709
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3199
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
767
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.