Forum Moderators: phranque

Message Too Old, No Replies

Refresh Cache for site redesign

         

rwilson

6:10 pm on Sep 6, 2012 (gmt 0)

10+ Year Member



I have just redesigned my website and I keep getting complaints that there is just text and no styles. People aren't hitting refresh to reload the style sheets. Is there any way I can force that refresh?

Thanks!

lucy24

9:35 pm on Sep 6, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



People aren't hitting refresh to reload the style sheets.

Well, you can't expect them to. It isn't normal user behavior. (See current thread elsewhere about average user's level of know-how ;)) And afaik there is no way to retroactively change cache/expiration information for material that has already been downloaded, since that's the whole point of local caching.

But why are they getting no styles at all? I'd expect them to see new pages with old styles, if anything. Did the site redesign include renaming and/or moving the stylesheet?

rwilson

10:12 pm on Sep 6, 2012 (gmt 0)

10+ Year Member



Exactly, not that I expect them to know that, just that's all thats needed to resolve it. I did rename the main style sheet. I know my server doesn't have proper expiration settings yet. Out of 140+ fellow employees, I've only heard from a few with this problem. Maybe this isn't that common? I haven't been able to replicate it.

Leosghost

10:22 pm on Sep 6, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



just rename the new stylesheet and do the same, in the source of your html....when the page calls it ..voila !:)

rwilson

10:37 pm on Sep 6, 2012 (gmt 0)

10+ Year Member



Cool I will try that! My main sheet is named the same as a secondary sheet on the old site... I had called it common.css on the previous site along with several other bulky style sheets. common.css is now my main style sheet. That may have caused some issues. Thanks!

lucy24

3:40 am on Sep 7, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I had called it common.css on the previous site along with several other bulky style sheets. common.css is now my main style sheet. That may have caused some issues.

Oh, ouch, yes. Browser sees a request for filename.css, checks its cache, establishes that it hasn't expired yet-- and has no way of knowing that filename.css now applies to a completely different thing. Better to do like leo says and rename everything. Then the browser will be forced to reload.

rwilson

9:28 pm on Sep 7, 2012 (gmt 0)

10+ Year Member



That did it! Thanks! Was able to replicate it and verify that it's fixed. I'm adding dates to my file names for future updates