Jump to content

caching css


pascal_22

Recommended Posts

Hello!

 

I have a little question about caching... for now.. i dont use caching for my website. i want to start using it and i found i tuto here

 

so i'll start to using ExpiresByType

I have a question:

 

 

Warning! If you set a far future expiry date for something and then update one of those files, you must change the name of the file for the browser to re-fetch it.

 

If i start cached today, and tomorrow i edit my css file...

 

Should i have to rename it or i can just add parameter as <link rel="stylesheet" href="style.css?v34">

 

Will that work?

 

Also, Google talk about Expires, Does it the same as ExpiresByType?

 

Thanks a lot

 

PAscal

Link to comment
https://forums.phpfreaks.com/topic/284565-caching-css/
Share on other sites

Adding a query parameter is enough. What you need to change is the URL used to reference the file so that it appears as a different URL to the browser, forcing the browser to re-download it. Changing the actual file name is not required.

 

 

Expires is the name of the actual header used in the HTTP response to indicate when the resource expires. ExpiresByType is a configuration directive for apache that you use to define what the Expires header should be for files of a given type.

Link to comment
https://forums.phpfreaks.com/topic/284565-caching-css/#findComment-1461436
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.