If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Which is well documented as to how it can be maintained, and that can be expanded upon for more detailed information. I've used it (with improvements and in addition to other code) in professional work to help generate reports on page usage.

Virtually all the information about the browser and OS that you can get is contained in the navigator.userAgent string. But the way in which it's presented varies by browser and OS. See:

Open it in a few different browsers, you should get the idea. One thing that's fairly consistent is the navigator.cookieEnabled boolean.

I'm not sure if you can get the color depth. That may require a higher level language run partially on the server. Flash might be able to detect that. Screen res/dimensions is easy. All browsers will report these accurately:

But these are only useful for validation to XHTML DOCTYPEs. They don't serve any functional purpose.

Ideally though, no such comments of any type should be used. If there's any problem with validation, the script should be made external.

Quite true forgot about those, I actually found he example in a copy of the gold edition f the JavaScript bible, written before we had the pain that is ie6, so it still was using the comments on the JavaScript as well as noscript tags.

"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus TorvaldsAnime Views ForumsBernie