I've been looking for a way to test to see if the user has Javascript enabled or a browser that supports it in ASP.NET MVC, and if they don't then route them to a page that tells them the site requires it to work.
However I haven't been able to find a definative answer to this..any suggestions?
I have been searching for the best ways to do this tonight as well and came across, I think, an ingenious solution.
<noscript>
<meta http-equiv="refresh" content="0;URL=http://yoursite.com/noJavascript" />
</noscript>
This redirects to another page if javascript is disabled without having to call functions, hide/show divs and worry about the flash of the DOM updating.
I know this has already been answered, but I haven't seen this approach anywhere on SO. If there is a reason, someone let me know :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With