0

In my website I have changed css of a page and these changes are not reflecting instantly when I open that page in browser. It showing old css styles because browser has a saved copy of my css file and it does not reflecting the new changes.

The new changes are loading in the page when I load the page by pressing (CTRL+F5) then the changes I have done are reflected in the page. So can I make css file which always loaded from server and the changes done that page can reflect immediately on the page.

Sridhar K
  • 31
  • 6

2 Answers2

0

Try adding this to your head tag

<meta http-equiv="expires" content="0">
0

Setting the http header for Cache Control

If you don't have access to the low level http headers, you can use a http equiv tag. Example:

<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">

Source: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching#cache-control

haboutnnah
  • 1,118
  • 11
  • 19