Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Fix image not shown due to cache #59

Merged
merged 1 commit into from
Apr 17, 2020
Merged

Conversation

henrych4
Copy link
Contributor

@henrych4 henrych4 commented Jan 9, 2020

Fix #57

@henrych4 henrych4 requested a review from embiem January 17, 2020 04:52
@embiem
Copy link
Owner

embiem commented Mar 6, 2020

Thanks for the PR!

Did this fix your issue consistently?

Is it because when loaded from cache, the onload callback wouldn't fire? I wasn't aware that setting the image src would trigger a synchronous load when the image comes from the cache.

@henrych4
Copy link
Contributor Author

henrych4 commented Mar 8, 2020

Yes this should fix the issue.

Reference: https://stackoverflow.com/questions/12354865/image-onload-event-and-browser-cache

@embiem embiem merged commit 3c0aa84 into embiem:develop Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

imgSrc sometimes not showing
2 participants