Solved

Redirect web visitors whose javascript is disabled

Posted on 2014-03-12
8
280 Views
Last Modified: 2014-03-12
I have an older website, whose features will degrade gracefully for browsers with javascript disabled.  A newly-launched website has features which would be more difficult to degrade gracefully.  I'd like to direct browsers to the old site by default, and over-ride that redirection with javascript.  I've tested this in the <HEAD>:

<noscript>
  <meta http-equiv="refresh" content="0; url=http://oldsite.com/">
</noscript>

It seems to be working, but  I don't know if there will be unintended consequences.  Perhaps there is an alternative approach, or is this an acceptable method?
0
Comment
Question by:ddantes
  • 4
  • 3
8 Comments
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39924969
What is the URL of the test site?  I'll be glad to try it in a few different browsers and let you know what happens.  

FWIW, I don't think there is anything wrong with your approach.  However, there are not very many clients who disable JavaScript (or cookies, for that matter) because if you remove these features you can't use most of the major and popular web sites like Facebook, Amazon, Twitter, etc.
0
 

Author Comment

by:ddantes
ID: 39924993
Thank you for offering to test.  www.mauivacationrental.com/test.htm  should redirect to www.mauitradewinds.com  with nojs.

I agree, it's a small audience who disable js.  If there's no harm in accommodating them, I'd prefer to do so.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39924997
That's the common way to do it and is supported in all browsers
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 109

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 39925280
Looks like it work OK.  I got redirected every time.  I also got snotgrams from Facebook :-)
0
 

Author Comment

by:ddantes
ID: 39925319
Thank you for testing, Ray.  Please excuse my antiquated mentality, but what do mean about "snotgrams from Facebook"?
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39925324
Facebook is "pretty lame" with JavaScript disabled.  They put a banner across the page to tell you how you are missing out on the "good experience."
0
 

Author Comment

by:ddantes
ID: 39925334
Got it!   Thanks again for your help.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39925338
Thanks for the points and thanks for using EE!  Enjoy Spring Break! ~Ray
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question