pascal_22 Posted June 11, 2012 Share Posted June 11, 2012 Hello, Some times i made big change in my CSS, all the time, when i put it online, the cache didn't refresh to the new one CSS file. I always need to refresh manually.... How can i make it to refresh when it changed? I saw on internet to add ?version=1 like: <link rel='stylesheet' type='text/css' href='CSS/css.css?version=1.1'> and just increment the version number when i made changes and it will refresh. Is that the good way to do it? Also, is there a performance issue doing it like this...? I mean, i just did it and Firefox can take 5-10 seconde to load my homepage..... and chrome seems to load fast. Thanks! Pascal Quote Link to comment https://forums.phpfreaks.com/topic/264007-how-to-make-css-refresh-automaticly/ Share on other sites More sharing options...
Mahngiel Posted June 11, 2012 Share Posted June 11, 2012 AFAIK you cannot do this without javascript performing a get request. There are several scripts found by doing a good ol' fashioned google search. Quote Link to comment https://forums.phpfreaks.com/topic/264007-how-to-make-css-refresh-automaticly/#findComment-1352994 Share on other sites More sharing options...
pascal_22 Posted June 11, 2012 Author Share Posted June 11, 2012 thanks for your answer... Is there a way to di this w/o JS? Thanks Pascal Quote Link to comment https://forums.phpfreaks.com/topic/264007-how-to-make-css-refresh-automaticly/#findComment-1352999 Share on other sites More sharing options...
PadLock Posted June 12, 2012 Share Posted June 12, 2012 As far as I know JS is the only way to do it. You might want to look into some AJAX documentation. It sounds to me like that is the sort of thing you are aiming for. Quote Link to comment https://forums.phpfreaks.com/topic/264007-how-to-make-css-refresh-automaticly/#findComment-1353058 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.