When a user refreshes/reloads a web page, this results in HTTP requests with max-age=0
. Pages utilizing the prefetch
or subresource
feature (e.g. tags like <link rel="subresource" href="/code.js">
in the head
) will then see two such fetches, at least from Chrome. Unlike regular page requests, Chrome does not appear to cache and indeed downloads the resource twice.
Is there a way to prevent this waste of resources? Can I hint to browsers that the prefetch
and subresource
features are only meant for regular page loads, or that even on a user-initiated page refresh they should cache it for at least one second?