Page Details JavaScript Code Snippets

These snippets all deal with Page Detail JavaScripts. There are several snippets that do make a site more pleasant to visit. You can write the time a visitor entered the page, how long they’ve been there, write when the page was last updated, whether it was updated since you last visited, and lots more.

Results via Envato Market

Use this script to delay the loading of a particular image. It can be used to delay the loading of large images or banner advertisements. A smaller image is loaded first, which can be transparent or blank. After a designated amount of time the larger image will load in place of the smaller one.

This unobtrusive script will update the current year for the copyright notice on a page. No need to worry about changing it from year to year. Very easy to implement.

Have you ever wanted to let others know the color palette that you use on your Web site? Or perhaps you need to figure it out yourself. This small script, along with a copy of MooTools (included), will create a palette of your Web page (images not included) that would please even the likes of Pablo Picasso.

If a visitor comes to your site and is looking through frames, this script will automatically make the page ‘break out’ of frames. As an added bonus, it’s only 8 lines of script!

Set your Web Cam for a Online viewing time and an Offline viewing time. This is very useful if you do not have you cam online 24/7. It will display the updated web cam image while during the online time, and an offline image during you offline time.

Displays a new image every day of the week. For example, it displays monday.jpg on Monday, tuesday.jpg on Tuesday, etc. You can also change what image is shown each day. Easy!

Use this JavaScript to keep a window ‘on top’ of the rest of your other windows. Not sure what I mean? Try it out and see!

I think it’s always interesting to see some information about the page itself. This JavaScript will write out when the page was viewed, according to the visitor’s clock.

Occassionally, it might be interesting to show the visitor how long they have been on your page. So, you can use this script to write a clock to the screen that will tell them exactly that!

When someone visits your web page, JavaScript will start the clock. When the leave that page, they will be alerted with the time they have been viewing the page! Cool!

If the other time on page scripts seem too impersonal for you, this could be your solution. Instead of the 00:00 readout, it displays ‘X Secs’. Just another wonder of JavaScript….

Don’t just welcome your visitors anymore, JavaScript can write good morning, good evening, or good afternoon based on the time the page was loaded, according to the user’s system clock. Neat!

Display an updated clock in the title bar of your website with this neat script! Easy to install, just cut, paste, and change the title! Now works in most browsers.

If you want to show your visitors how long they have been on your page but don’t exactly like those clock displays, then you might like this script. When the visitor leaves or clicks the button, they are alerted to the time they have been on your page. Many times, they won’t even expect it!