0

So I've spent the entirety of today trying to figure out the best approach in preparing to re-design our business website with the expectation that less than 1% of the people browsing the web have JS disabled.

It is the general opinion of our management team that we would like to have our website be functional if the user does not have any JS capabilities or has them disabled for whatever reason. Now, I am aware of the concept of both graceful degradation and progressive enhancement; but both methods feel as if they would make the design process rather complicated and truthfully I'm inexperienced with both concepts.

Additionally, I am 'also' aware of the <noscript> tag, but we do not want to have the page be completely inaccessible and have to advise the user to "turn it on" or anything like that.

So, my question is this: is it a stupid idea to redirect to an entirely separate website if the browser detects JS is disabled (if that is even possible?) What about a page?

I ask because our current website is roughly ~15 years old and is pure html and css. We're in the process of re-branding and are wanting to update to a completely new look, but from what I'm seeing most of the mobile responsiveness capabilities require JS (not to mention nice looking drop-downs, sticky menus, etc).

Does anyone have any working experience with what I have to accomplish? What would be the best way to tackle something like this as one of the requirements is that the new website 'must' be responsive.

Thanks!

3 Answers 3

2

As far as redirecting without JS is concerned, you can use the meta tag in your head to do that:

<noscript>
  <meta http-equiv="refresh" content="0; URL='http://example.com'" />
</noscript>

As to the rest of your questions, they can't really be answered here. It all depends on your site's dependency on JS and what alternatives you have available.

Sign up to request clarification or add additional context in comments.

3 Comments

How does that detect lack of JS?
Perhaps I should have clarified a little better, I'm interested in knowing if there is a way to 'detect' if the user has JS disabled, and if they do.. redirect to another site, etc.
@CoryRamirez My bad, I thought you were asking for a way to redirect without using JS
1

<noscript> //somecontent </noscript> Will show content ONLY to users without JS, redirecting is not a good idea, the vast majority of users has javascript enabled, and the ones who doesn't would probably like to know they doesn't, just let them know.

Still, you could do:

<noscript><meta http-equiv="refresh" content="0; URL='http://example.com'" /></noscript>

EDIT: Local redirect:

<meta http-equiv="refresh" content="0; URL='example.html'" />

Will lead to:

yourdomain.com/example.html

4 Comments

Instead of redirecting to another external website, would it be possible to lets say redirect the user to another 'index2.html' or 'home page' if detected that javascript is disabled?
yes I will put it on the answer, code in the comments is not easy to read
Okay so if I wanted it to redirect locally if JavaScript is disabled, I would put that code in <noscript> tags, yes?
Yes, whitout the <noscript> tags it would redirect everyone!
0

I don't claim to be an expert in this field but I don't think I would recommend redirecting to another site purely because someone has disabled Javascript. Instead you could possibly put a little banner on the bottom of your site that is hidden if JS was enabled and would show if it were not.

1 Comment

Yeah, I'm a little hesitant myself but if designing around the fact that users may have JS disabled is a requirement of ours; I'm just trying to find the best way of doing that. JS is just so powerful now and trying to degrade a fully equipped JS site into one that works without it seems very difficult.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.