Precaching Images with Javascript

Posted by hank, Mon Apr 16 22:53:00 UTC 2007

Today, Will told me about some awesome image caching. I used it.

//Do some image caching
cached_image = Array(new Image(), new Image(), new Image(), new Image());
cached_image[0].src="image1.jpg";
cached_image[1].src="image2.jpg";

It’s amazing.

Tags:

Comments

Have your say

A name is required. You may use Markdown in your comments.