Can't figure out how to prevent HTTP caching in Chrome using cache-control

700 views Asked by At

I'm having some trouble trying to prevent my page from caching using the cache-control parameters in the HTML header. Below is a sample HTML code which I've created for testing purposes. I can't seem to figure out what I'm missing though, or perhaps I'm misunderstanding how all this cache-control really works. I would appreciate if someone could help me figure out what I am doing wrong.

Sample HTML:

<html>
<head>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
</head>
<body>
    Test Html
</body>
</html>

I apologize for the link, but I'm not allowed to post pictures yet. When I view "chrome://cache", I see the cached page in the list of cached items. Clicking on it, I am able to view the actual content itself.

Chrome's cache

From my understanding, using the no-cache or no-store should prevent the page from appearing in Chrome's cache. Is this assumption correct?

Thanks in advance.

Heng

0

There are 0 answers