Current Twitter detect Javascript and display page error
As many already know, Twitter is currently facing an error in their javascript detection for all IE browsers (8 and below).
http://screencast.com/t/1wXBV9FWdI
Although a pain in the butt - i actually like how they completely block access to the site whereas those like facebook only displays a small error bar at the top of each page.
In looking at the source code, I see:
<h2 id="no_javascript_warning" style="margin-top: 100px;">You cannot use the Twitter website without having JavaScript enabled on your web browser. Please re-enable JavaScript and refresh this page.</h2>
<script type="application/javascript">
//<![CDATA[
document.getElementById('no_javascript_warning').style.display = 'none';
//]]>
</script>
even though the entire page is loaded in reality. I am curious:
- what is the benefit of loading the entire page开发者_开发问答 in this sense as opposed to a redirect?
- How are they doing this? I do not see a 'noscript' tag anywhere.
- I see no benefit. Yes, maybe one. When you enable your javascript, it's easier for user to just refresh. When user is redirected, it may confuse him. After refresh, he would see same ereor
- This warning HIDES only when javascript is enabled. It's shown on refresh but hidden fast with javascript
精彩评论