JavaScript
Article
By Sam Deering

jquery add image to browser cache

By Sam Deering

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).

--ADVERTISEMENT--

(function($,D,W) {

    var JQUERY4U = {};

    JQUERY4U.UTIL = {

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

        preloadImages: function()
        {
            $('body').append('
Recommended
Sponsors
The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account