Skip to content

Instantly share code, notes, and snippets.

@nikolaydubina
Last active April 23, 2024 04:13
Show Gist options
  • Save nikolaydubina/b1c0461252beffad9c6258224bef76a9 to your computer and use it in GitHub Desktop.
Save nikolaydubina/b1c0461252beffad9c6258224bef76a9 to your computer and use it in GitHub Desktop.

Why browsers do not send If-None-Match for caching images? Why browser does not try to get 304 status code for caching?

This can be because there are video html that is trying to load at same time. This can break some browser behavior that will not even attempt to use cached images for some reason. Make preload="none" for videos to stop loading them, and then browser will attempt to use etags for images. Add Cache Control: public. This will make Safari to attempt If-None-Match and make 304 requetsts. private should also work.

2024-04-23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment