I was on the site stackoverflow with javascript disabled, so appeared the warning message that it is better to enable JS for a better navigation, etc… My question is why looking at the source code, it is present a img src for a 1x1 pixel? What is its use?
This is the source I have seen:
<noscript>
<div id="noscript-warning">Stack Overflow works best with JavaScript enabled<img src="http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif" alt="" class="dno"></div>
</noscript>
That would be a tracking pixel. When a request to load the image gets sent to the server, it allows the host to gather user statistics and track their behaviour – in this case, they’ll know that you had JS disabled on SO.
There are thousands of other levels of “disabled” with JavaScript though so there is still no guarantee that the script can run in a given browser. So just because JavaScript is enabled doesn’t mean it will work on older browsers.
Any page still using <noscript> ought to be displaying a message “This page works best with browsers at least 15 years old”.