Permalink
Browse files

Further fixing caching problems.

  • Loading branch information...
peol committed Aug 23, 2010
1 parent a4aad46 commit ab35d8327a1f3d2abce610b68e3a16e488e665ce
Showing with 4 additions and 1 deletion.
  1. +4 −1 ahpi.imgload.js
View
@@ -25,7 +25,6 @@
$.event.special.load = {
add: function (hollaback) {
if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {
-
// Image is already complete, fire the hollaback (fixes browser issues were cached
// images isn't triggering the load event)
if ( this.complete || this.readyState === 4 ) {
@@ -36,6 +35,10 @@
else if ( this.readyState === 'uninitialized' && this.src.indexOf('data:') === 0 ) {
$(this).trigger('error');
}
+
+ else {
+ $(this).bind('load', hollaback.handler);
+ }
}
}
};

1 comment on commit ab35d83

@JasonGross

This comment has been minimized.

Show comment Hide comment
@JasonGross

JasonGross Jan 3, 2011

This commit breaks things for me. What problems is it supposed to fix?

This commit breaks things for me. What problems is it supposed to fix?

Please sign in to comment.