The purpose of loading an img pixel in a noscript html tag

Hi,

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>

many thanks!

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.

1 Like

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”.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.