User Details JavaScript Code Snippets

These snippets all deal with information about the visitors. See how many sites they’ve been to since they started their browser, their hostname, and a bunch of information about their browser.

Results via Envato Market

JavaScript can write a neat little box to the screen telling the visitor’s browser and operating system.

Cascading Style Sheets (CSS), supported in version 4.0 and new browsers, allows webmasters to have more control over how their sites are viewed. Because some visitors do browse with them turned off, this script checks if CSS is supported AND enabled — If CSS is on, they are redirected to your CSS-enhanced page. Otherwise, they are sent to a normal page without CSS. Cool!

More information about the web browser than you knew existed! Find out the code name, color depth, platform, if java is enabled, resolution, ip address, hostname, and more! Simply incredible.

If you maintain separate pages for Netscape and Internet Explorer browsers and want to additionally divide each browser’s page into version pages, this script is for you. The script will create a link (or can be changed to automatically redirect) to browser[version number].html. (For example, a visitor with Netscape 4.5 would be see a link to netscape4.html)

If your visitors are not quite sure the details of the browser they are using, you can show them with this neat little script. The script will produce a table that shows the browser name, version, platform name, and whether Java is enabled . Updated!

If you maintain a different page for Microsoft Internet Explorer and another for Netscape browsers, you should use this script. Quite simply, it sends the right browser to the right browser-optimized page.

This script does a great job of displaying information about your web browser including version, your computer’s platform, if Java is enabled, how many pages you’ve visited, and screen resolution. Take a look, it’s pretty cool.

I always like to show the visitor a little bit more about their computer than just the name. This script does that for me, or you. 🙂

Let someone add you to their AOL Buddy List or have them send you an Instant Message with text in the message block that you can choose! And it’s only two lines of code!

There are times that you want to load different background colors/images based on a viewer’s screen resolution. This script is perfect for this application. It works beautifully with IE and Netscape.