pascal_22 Posted December 5, 2013 Share Posted December 5, 2013 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 More sharing options...
kicken Posted December 5, 2013 Share Posted December 5, 2013 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 More sharing options...
pascal_22 Posted December 6, 2013 Author Share Posted December 6, 2013 Thanks a lot! I really appreciate! So if i used ExpireByType and i also used g-zip for compression, i m in a good way to optimize the performance of my website! That s right? Have a great night! Pascal Link to comment https://forums.phpfreaks.com/topic/284565-caching-css/#findComment-1461451 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.