Skip to content

Commit

Permalink
Bypass browser cache on reloading image with the same name.
Browse files Browse the repository at this point in the history
Not sure if its good, the intention was to have reloading changed images with the same name working on electron. Could this be bad for browser games in terms of loading time?
  • Loading branch information
AndreiRudenko committed Mar 14, 2024
1 parent 4253228 commit eb0fbde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Backends/HTML5/kha/LoaderImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class LoaderImpl {
img.onerror = function(event: Dynamic) failed({url: desc.files[0], error: event});
img.onload = function(event: Dynamic) done(Image.fromImage(img, readable));
img.crossOrigin = "";
img.src = desc.files[0];
img.src = desc.files[0] + '#' + Date.now().toString();
}
}

Expand Down

0 comments on commit eb0fbde

Please sign in to comment.