[thelist] Redirecting with <noscript>

Mark Gallagher mark at cyberfuddle.com
Sat Jul 27 23:48:01 CDT 2002

Nik Schramm wrote:
> In a site i'm building I need to redirect users that have deactivated
> JavaScript to another page. I can do this:

If you need to do this you've probably done something Silly, like used
JavaScript for mission-critical functions.  Please don't be offended for
me asking you this, but is there any way you could set it up so
non-JavaScript-users can still use the original page?

<snip />

> Unless I'm missing something, I can only detect if a browser /supports/
> JavaScript, but not if it is actually activated, when trying to redirect
> using a server-side language (in my case .NET/C#). That's how I ended up
> with the client-side <noscript> hack in the first place.
> What to do ? Is there any valid way to silently redirect non-js users ?

Why not take the reverse approach, and redirect JS users?  That way you
wouldn't have to worry about browser-detection - just setup a JS
redirect to a different page.  Browsers that understand the redirect
will follow it and get the "benefit" of a page built with them entirely
in mind.  Browsers that don't understand the redirect get to stay where
they are.

No fuss, a livably small percentage of muss :-)

More information about the thelist mailing list