Forum Moderators: not2easy

Message Too Old, No Replies

css file versioning

make sure google cache doesn't look weird

         

the_nerd

1:49 pm on Dec 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

not sure if I'm the only fool to get this wrong: I did a major layout change to a whole web site but kept the same name for the css file. Result in Google Cache: Old html (takes time until all pages are visited and indexed) with changed css information. Looks ... well, interesting.

What are you doing to avoid this trap? New css filename after every change?

the_nerd.

webdoctor

2:06 pm on Dec 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



New css filename after every change?

Yup. I'm not worried about Google's cache though, I'm worried about ISPs who have a transparent proxy w/ cache sitting between their users and my site. Doesn't matter what 'nocache' settings you serve content with, some ISPs just don't care and cache it anyway.

I tend to look at my CSS files the same way as I'd look at a DNS zone file - name them after the date and increment them with version numbers on top - so main2006121901.css would be my first change on 19 December 2006, then main2006121902.css and so on.

You also get the benefit of being able to step back a version or two very easily if you screw something up - sort of "version control" for CSS :-)

the_nerd

4:18 pm on Dec 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



good point - thanks a lot!