JavaScript - - By Sam Deering

jquery add image to browser cache

This is how you might preloading images using jQuery to add the images to browser cache (as part of a DOM div element which is hidden).

(function($,D,W) {

    var JQUERY4U = {};

    JQUERY4U.UTIL = {

        images:
        {
            loadingImage: 'loading',
            ajaxImage: '',
            savingImage: 'saving'
        },

        preloadImages: function()
        {
            $('body').append('
Sam Deering
Meet the author
Sam Deering is a Front-end Web Developer who specialises in JavaScript & jQuery. Sam is driven and passionate about sharing his knowledge to educate others.
Sponsors