![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have updated my CSS and if you view the main page with the old css cached, it breaks the page. Is there any way to force viewers that have the old css cached to get the new css? Our viewers are NOT tech savvy, and wouldn't know what a "hard refresh" is, nor that it needed to be done. |
#3
| |||
| |||
|
|
hughestroop (AT) gmail (DOT) com> wrote in message news:1162999139.311728.159040 (AT) h48g2000cwc (DOT) googlegroups.com... I have updated my CSS and if you view the main page with the old css cached, it breaks the page. Is there any way to force viewers that have the old css cached to get the new css? Our viewers are NOT tech savvy, and wouldn't know what a "hard refresh" is, nor that it needed to be done. Use a meta tag in the head to expire the page. META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT" |
#4
| |||
| |||
|
|
"Mark F." <reply2group (AT) nospam (DOT) com> writes: hughestroop (AT) gmail (DOT) com> wrote in message news:1162999139.311728.159040 (AT) h48g2000cwc (DOT) googlegroups.com... I have updated my CSS and if you view the main page with the old css cached, it breaks the page. Is there any way to force viewers that have the old css cached to get the new css? Our viewers are NOT tech savvy, and wouldn't know what a "hard refresh" is, nor that it needed to be done. Use a meta tag in the head to expire the page. META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT" Useless - won't affect the CSS file, and would be overridden by any real HTTP headers anyway. Oh, and of course, anyone with a copy of the page stuck in their cache won't see the new version. The best solution is to copy the new CSS file to a new filename, and then change the HTML to point to the new CSS. Then they should either get old CSS+old HTML, or new CSS+new HTML. Since you changed the HTML first, it might still break, but from what you say people *are* getting the new HTML fine. |
#5
| |||
| |||
|
|
hughestroop (AT) gmail (DOT) com> wrote in message news:1162999139.311728.159040 (AT) h48g2000cwc (DOT) googlegroups.com... I have updated my CSS and if you view the main page with the old css cached, it breaks the page. Is there any way to force viewers that have the old css cached to get the new css? |
|
Use a meta tag in the head to expire the page. |
#6
| |||
| |||
|
|
Mark F. wrote: hughestroop (AT) gmail (DOT) com> wrote in message news:1162999139.311728.159040 (AT) h48g2000cwc (DOT) googlegroups.com... I have updated my CSS and if you view the main page with the old css cached, it breaks the page. Is there any way to force viewers that have the old css cached to get the new css? No. If age information was sent previously, either the cached resource needs to expire, the cache must be cleared, or the user must force it to be updated. If only a validator was sent, then there shouldn't be any problem, however a browser or intermediary cache can be forced to cache data in spite of (some) directives from the server if it's more beneficial to the user than up-to-date information. [snip] Use a meta tag in the head to expire the page. A meta element cannot be expected to control caching: an intermediary cache is very unlikely to check the message body, and even a browser doesn't have to respect it. Caching should be controlled only by HTTP headers. Besides, how does this help data that's already been cached? If the user agent isn't going to the server, how is it going to read this meta element? Mike |
#7
| |||
| |||
|
|
"Chris Morris" <c.i.morris (AT) durham (DOT) ac.uk> wrote in message [meta refresh on the page is] Useless - won't affect the CSS file, That doesn't make sense. A page is parsed completely when it expires, therefore an scripts that are listed in the head will be reloaded fresh as well. Do you have any example of how it fails? |
#8
| |||
| |||
|
|
That doesn't make sense. A page is parsed completely when it expires, therefore an scripts that are listed in the head will be reloaded fresh as well. |
#9
| |||
| |||
|
|
If the cached object(s) is stale, or the expiration time is expired, or the data has been set to only one session, the page and scripts will be re-cached from the server. |
|
I've never had problems updating sites using an expiration date or the like. |
#10
| |||
| |||
|
|
Mark F. wrote: [snip] If the cached object(s) is stale, or the expiration time is expired, or the data has been set to only one session, the page and scripts will be re-cached from the server. The stale and invalidated entities will be, yes, but the assessment of age or validity is made on a case-by-case basis. That one is now stale or invalid doesn't automatically invalidate other resources, whether they are related or not. I've never had problems updating sites using an expiration date or the like. That statement doesn't mean much without knowing the precise circumstances in which you observed what you did. That is, the configuration of your browser, the state of your cache, the headers sent by the server, and the headers sent by the browser are all important factors. Mike |
![]() |
| Thread Tools | |
| Display Modes | |
| |