'Can we use HTTP caching for navigation requests?

What is Navigation requests

Navigation requests are requests for HTML documents made by your browser whenever you enter a new URL in the navigation bar, or follow a link on a page taking you to a new URL.

Question

[1] I want to understand if I can use stale-while-revalidate cache-control header instead of using a service worker to cache my inital HTML page?

What have I tried?

I tried to test this using Fiddler (to change the response cache-control header), but it did not work for HTML request, though it worked for other resources like JS for some websites.

[2] Which makes me think if I have to change any other parameter also?

Didnt work for HTML request Didnt work for HTML request It worked for JS files because we can see app.bundle was served from cache but was revalidated in background. It worked for JS files



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source