Nitobi
Customer Login
Services
Products
About
Blogs
Contact
Home -> Product Knowledgebase Order Online | Free Trial Downloads

Nitobi Product Knowledgebase

Precache All Stylesheet Images


Nitobi Toolkit comes with a convenient helper method to scour all the stylesheets on a page and pre-load all the images. This has the advantage of making any images used in CSS come up right away when they are called, instead of having to wait for them to be downloaded - really improving the user experience.

nitobi.html.Css.precacheImages();

By calling precacheImages() with no arguments, it will loop through all your stylesheets and attempt to pre-load every image. If you pass a reference to a particular stylesheet, it will just do that one:

 var b = nitobi.html.Css.getStyleSheetsByName('nitobi.tabstrip.css');
 for (var i=0; i<b.length; i++) {
  nitobi.html.Css.precacheImages(b[i]);
 }

This will just pre-load the images in the nitobi.tabstrip.css referenced in our header.

View Printable Version

Comments:


Name:

Type the text you see above:

Comments:


Knowledgebase

To be notified of new articles when they're available, subscribe to our RSS feed.

Support Resources

Take advantage of our knowledgebase of product tutorials and tips, and our support forums!

Search Site


Sign up for our Newsletter:

Get industry articles and Nitobi company news in your inbox every couple of months — here's a sample!

Email:




Site RSS Feed  | All contents are (c) Copyright 2006, Nitobi Software Inc. All rights Reserved