hu*********@gma il.com wrote:
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?
Get in your time machine and serve the old CSS with some suitable HTTP
headers that suggest not to cache it for all eternity. Hopefully your
well-adminned server was already doing this, but it's not guaranteed.
Back here and Now you should serve the new CSS document with correct
headers indicating it has been updated (it's unlikely your server isn't
doing this).
At some reasonable interval, then web browsers will check to see if
their old cached copy is still sensible. Then they'll check for an
update and see the new one. They're usually pretty good at this (within
a day or a reboot or so). There's little you can do in the meantime
though, unless you can visit each browser personally.
If you're doing development work, then the headers you serve on a CSS
document should indicate it's very likely to expire soon and caching
shouldn't be prolonged, if at all. You can always increase these again
once you've finished work. This is obviously easier if you use "dev"
and "production " servers.
If you had posted a URL we could have told you a lot more useful
information about how things actually were.