Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should "list of available images" also cache broken image responses? #4480

Open
domenic opened this issue Mar 29, 2019 · 2 comments
Open

Should "list of available images" also cache broken image responses? #4480

domenic opened this issue Mar 29, 2019 · 2 comments
Labels
needs tests Moving the issue forward requires someone to write tests topic: img

Comments

@domenic
Copy link
Member

domenic commented Mar 29, 2019

Porting from https://www.w3.org/Bugs/Public/show_bug.cgi?id=25798.

We need web platform tests, and potentially a spec change, to see how many fetches get made in the following scenario:

  • An image is fetched, but comes back broken (network error etc.)
  • After that fetch completes, another <img> for the same URL is inserted into the document

Do browsers try to fetch again? Or do they just immediately give back the broken image?

@domenic domenic added topic: img needs tests Moving the issue forward requires someone to write tests labels Mar 29, 2019
@domenic
Copy link
Member Author

domenic commented Mar 29, 2019

The existence of https://www.w3.org/Bugs/Public/show_bug.cgi?id=26068 and https://bugzilla.mozilla.org/show_bug.cgi?id=528448 indicates that they do cache such broken images and immediately fire onerror again. So likely closing this just requires writing tests. Let's be sure to include the onerror recursion test case mentioned in that bug (with some limit like 100 retries).

@zcorpan
Copy link
Member

zcorpan commented Jul 4, 2022

If it's web compatible it seems nice to break the onerror recusion at least if src is set to the same value as the previous value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs tests Moving the issue forward requires someone to write tests topic: img
Development

No branches or pull requests

2 participants