-4

Currently, I am facing an issue with HTML page. So here if a user visited the site then the browser is caching the entire HTML page. So when the user hits the URL again then the browser taking that HTML from the cache instead of calling/requesting to the server for HTML contents. Here our Team member forgot to add meta tags which would force the browser to take content from Server each time. Is there any way that we could resolve the issue? Since the page request itself not reaching the server so User will not see the refresh contents of the website. If user do Ctrl+F5 then they can see updated contents. I went through many sites and stack overflow questions but I did find a solution for forcing HTML page to load contents from server using meta tags.But existing users is there any resolution that we could apply?

Problem is here the page did not call server to get contents it just loads from cache.

sujayadkar
  • 63
  • 1
  • 13
  • How would you update the page if you could not add meta tags to the same page? For example can you add any JS? – mplungjan May 18 '21 at 14:35
  • You could look into web sockets – Prosy Arceno May 18 '21 at 14:36
  • Does this answer your question? [Is there a tag to turn off caching in all browsers?](https://stackoverflow.com/questions/1341089/is-there-a-meta-tag-to-turn-off-caching-in-all-browsers) – Mohammad Masoudi May 18 '21 at 14:38
  • @ProsyArceno — That won't help: The browser won't load the new HTML document with the new JS that would start the web socket connection. – Quentin May 18 '21 at 14:48

1 Answers1

0

There's nothing you can do.

You've previously instructed the browser to cache the file (presumably for a long time) and not check for updates (via ETags or If-Modified-Since) so it is going to use the cached version until its cache expires (from the user intervening or automatically (which might be sooner than your caching instructions said)).

There's no way to provide new caching instructions to the browser without it requesting them from the server (which it won't do because of the existing rules).

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335