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

This script will send you an e-mail whenever the page with the script is loaded. This script works great as long as you don’t have too many visitors or it spams your e-mail box!

Besides basic browser identification (type, version), Netscape users can also see an extensive list of every mimeType and every plugin on your computer. Select one from the pulldown menu and even *MORE* information is displayed in the box. Finally, such additional details as screen width, color depth, and how many sites you have visited so far finish of an incredible display of pure JavaScript power. Wow!

Use this script to show visitors several interesting details about their screen – the screen width, screen height, and screen resolution of their browser window!! You might use this script to suggest that your visitors expand their browser to a larger size before accessing your site, etc.

(Requires 4.0+ browsers) Displays what percentage of your screen’s total area is being used by the browser window. This script will not even be run and will not cause errors in lower version browsers.

Use this script to show visitors an interesting detail about their screen – the size of their browser window!! You might use this script to suggest that your visitors expand their browser to a larger size before accessing your site.

Do you just not like the browser and computer “user agent” line that the web browsers use? This neat script (written by Netscape!) actually converts the user agent line into a more “user friendly” form, indicating the user’s computer platform, browser version, and more! Check it out!

How do you let your visitors know that they do or do not have the right browser to view your site? Use this JavaScript! It’ll tell them if they are using the right browser and the right version, or not….

If you are involved with graphics creation or website design, it’s important to understand how colors are seen on different browsers and different platforms. This script will show you all the “safe” colors, the ones that show up the same for all browsers and platforms. So, when you design a site or create an image, be sure to use the “browser-safe” colors! Don’t you just love JavaScript?

Redirects the user based on the referring web address. Now its a breeze send people to different sections of your site based on where they came from. Clever!

It’s always fun to show how good you are with JavaScript. This script will show where the visitor came from. Pretty cool!

(Version 4.0+ Browsers) Loads an image with different dimensions based on the users screen resolution setting. Higher resolution browsers see an image with increased dimensions and lower resolution browsers see an image with decreased dimensions. This separation ensures that each browser sees the image size that looks best in their browser. Great use of JavaScript1.2 also!

Because seeing a table of your plug-ins is cool and all, take a look at this script. First, the JavaScript counts how many plug-ins the user has installed. Then, it alerts the user and comments on the number of plug-ins. Pretty cool!

Use this script to display a table with all the plugins installed on the visitor’s computer. Another neat script because it deals with the user’s computer specifics directly.