sinhayash
sinhayash

Reputation: 2803

Why slider is loading images again and again?

I am trying to use the slider at http://www.skitter-slider.net/ I have deployed it here: http://dl.dropboxusercontent.com/u/105046436/index.html at the GALLERY Page.

As I'm watching the Network panel in Chrome Dev Tools, it seems the plugin loads the image each time it is displayed, not just once. Am I right ? If yes, any way to fix this ? (or maybe add a caching option ...)

This is not happening at the main site(http://www.skitter-slider.net/)

Any suggestions would be helpful

My JS code:

<script type="text/javascript">
var box_skitter_large = null;
    $(document).ready(function() {
        $(".box_skitter").skitter({ 
            theme: "square", 
            numbers_align: "center", 
            dots: true, 
            preview: true, 
            focus: true, 
            focus_position: "leftTop", 
            controls: true, 
            controls_position: "leftTop", 
            progressbar: true, 
            enable_navigation_keys: true, 
            onLoad: function(self) {
                if (this.thumbs) $('.border-skitter').height(350);
                box_skitter_large = self;
            }
        });
    });
</script>

My HTML Code:

<div class="box_skitter skitter-square" style="top: 0px; left: 0px; position: relative; z-index: 9999;">
    <ul style="display: none;">
        <li><img src="/u/105046436/images/gallery/1.jpg" /></li>
        <li><img src="/u/105046436/images/gallery/2.jpg" /></li>
        .
        .
        .
        <li><img src="/u/105046436/images/gallery/16.jpg" /></li>
    </ul>
</div>

Upvotes: 1

Views: 138

Answers (1)

sinhayash
sinhayash

Reputation: 2803

I think my problem is related to Browser cache images served from Dropbox

I'm using dropbox to test my files. The response headers from Dropbox probably have "cache-control" set to "no-cache".

Upvotes: 2

Related Questions