Can web requests that sending in background script use the cache that set by web pages?

Lets say a web page loaded an image that includes a response header Cache-Control: public, max-age=3600, the image is cached.

Then, an add-on (Manifest V3) send a fetch request to the same image in background script. Can this fetch request utilize the cached image?

1 Like

Nope. Browsers partition storage in order to prevent trackers from identifying users across sites. The top level browsing context’s origin is used as the partition key. In this case the web page’s cache and the extension’s cache would be separated into different partitions based on their origins. See this MDN article on State Partitioning for more info.

2 Likes