How to prevent css and js from being used by your ISP?

I have a "dump" isp that has always cached internet pages and its css for at least 1 day. Despite the fact that css / js on the server have changed, the css submitted does not change (every time I was cleared by the cache)

how to "say" my isp not to cache some files like css and js?

thanks!!

at the moment: I use a proxy server to check on a developed network that it is not cached.

+3
source share
3 answers

The qaru method solves this problem itself: add the version parameter to the CSS and JS URLs that are related to the version of the referenced files:

 <link rel="stylesheet" href="http://sstatic.net/so/all.css?v=4542">

, , href HTML-, , , .

+9

, :

<link href="/css/style.css?cachekiller=1337" media="screen" rel="stylesheet" type="text/css" />

1337 , .

<?php time() ?> 

-

+1

HTML , <script> <style>. , HTML , , .

, 100% , CSS JS .

0

Source: https://habr.com/ru/post/1718519/


All Articles