How to turn off caching in some page in website?

by filiberto , in category: Third Party Scripts , 3 days ago

How to turn off caching in some page in website?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by dana , 2 days ago

@filiberto 

You can turn off caching in specific pages of a website by adding the following code to the header section of those pages:

1
2
3
<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" />


This code will instruct the browser not to cache the content of the specific page, ensuring that each time the page is accessed, it will fetch the latest version from the server.