Open AlexNodex opened 8 years ago
Further investigation reveals that it's most likely an issue inside the Safari code that perhaps refuses to load an image if the source change is no different because if I change the el.src line to el.src = src+'?'+new Date().getTime();
then it works as expected, this is obvisouly really bad for caching as I don't want to be forcing a new download each time nor do I want to be appending query strings to sources.
I have worked out a fix that shoul save the cache round trip.
Around line 216
if(src) { el.src=src; }
Needs changing to
if(src) { el.src=''; el.src=src; }
Hope this helps someone else
I can confirm the bug/Problem in OS X El Capitansafari 9.1 also the solution works fine, thank you!
When loading on Safari (OSX El-capitan [not sure if this helps]) and the image has both a "src" and "data-src" attribute then the "load" never gets fired- if I remove the "src" attribute and just leave "data-src" then all is well.
This happens on my retina macbook pro but ONLY on a screen with a DPR of 1 - it doens't effect retina loading.
A little debugging has shown that it grabs the source fine, just something never completes!
On every other browser using the same scenario then it's fine - seems to be scoped to Safari.