jQuery: The Write Less, Do More JavaScript Library

Some problems with (maybe) caching

View: New views
2 Messages — Rating Filter:   Alert me  

Some problems with (maybe) caching

by Trencavel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm running in a problem, which I can't solve alone and I need some
hints of experts.

I'm using $.getJSON() to populate a list with images (image src are
external too) and then I try to build a gallery from this list with
the JQuery plugin galleryview.

The problem I'm running in is, that the described construction works
not in IEs and Safari4, when the images (or the AJAX result) are in
the browser cache. All other browsers works fine here.

I tried to set the AJAX caching to false and disabled the sending of
the las-modified header, but nothing seems to work. :(
Unfortunately my knowledge about the different caching mechanisms of
the browsers are very limited - if this problem is a caching problem
at all.

The galleryview plugin works as expected when the list is populated
manually and not via JSON.

An example you can see here: http://www.nrw-tourismusmagazin.de/regionen/1/bergisches-land

It would be nice if someone can give me some hints!

Best regards and thanks in advance,

trenc

P.S.: It would be nice to become CCed by an answer, I don't regulary
read this mailing list.

[SOLVED] Some problems with (maybe) caching

by Trencavel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I did a whole day in researching the problem. It seems to be an issue
related to load() and IEs and Safari when images are already cached.
If the images are already cached the load won't firing the callback
function respectively load() will not fired.

But I've found the onImagesLoad plugin:
http://includes.cirkuit.net/includes/js/jquery/plugins/onImagesLoad/1.1/documentation/index.html

This plugin seems to handle the »images-load-cache-problem« correctly
in all tested browsers.