I'm trying to work out how to force a browser to refresh its css. I've sent header information no-cache, must-revalidate and an expiration date in the past. But no dice. I have to manually refresh the page for the updated css to be included.
Jayne ,'Jaynestown'
Buffistechnology 3: "Press Some Buttons, See What Happens."
Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
I looked around a bit and this [link] looks promising.
I looked around a bit and this [link] looks promising.
Huh. That kinda' clever. I was thinking you could change the name of the css each time you want it to refresh, but figured that would be too much of a PITA.
Ooh thanks.
Very clever! One of the commenters had a good idea to further this: make the version # a php variable containing the date stamp of the css file. Then you never have to update the css link.
That won't work for the board, but I might be able to force a reload right after the file is updated and saved, and hopefully that takes.
That won't work for the board
Why not?
Well, I don't want to do a file date/time read every time a page loads. Overhead.
So, I overstated. Can work. Don't think it's our best solution.
I'm pissed that what should work, the http headers, does not.
Right now I think asking the user to refresh one page is clunky but overall better.
Overhead
Ahh, makes sense.