Solved

Redirect web visitors whose javascript is disabled

Posted on 2014-03-12
8
276 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 108

Expert Comment

by:Ray Paseur
Comment Utility
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
Comment Utility
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
Comment Utility
That's the common way to do it and is supported in all browsers
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 total points
Comment Utility
Looks like it work OK.  I got redirected every time.  I also got snotgrams from Facebook :-)
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

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

Expert Comment

by:Ray Paseur
Comment Utility
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
Comment Utility
Got it!   Thanks again for your help.
0
 
LVL 108

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now