Is there a better way to collect data on how many visitors don’t have js enabled. My idea was to add a hidden value at page load with js. If it works then js was successful. But looks like there’s no way to actually read it back to know if it was successful unless I do some kind of a page reload, but now it gets complicated (I have to delay whatever operations that were about to happen, etc. so as I said gets complicated). Any tips or ideas on this? I’m sure there’s a better practice way than mine.
I should add, if there’s already a ready-made solution for this, please let me know, I’m not really interested in reinventing the wheel 🙂
A good way to do this is use a
<noscript><img src="track.php" width="1" height="1" /></noscript>, and that will allow for browsers without javascript to pull a tracking image and then the server can get the Useragent and IP from that tracking image.