Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Javascript Detection

It has always perplexed me how to detect when a browser doesn't have javascript enabled; not just installed, but also enabled.

Unexpectedly, while looking into favicons, I discovered this while looking through the HTML source on a particular website...

<noscript>

<meta http-equiv="Refresh" content="1; URL=/Errors/JavascriptNotEnabled.aspx">

</noscript>

Wow! Surprisingly simple and graceful.

I've pasted this into the head of my master page and so far so good.

 

 

No Comments