views:

47

answers:

1

hi folks, I'm doing some things with a facebook widget. They cache the css files, and I'm trying to override the cache.
http://wiki.developers.facebook.com/index.php/Fb:fan

The instructions say:

Note: To provide you with better performance, we cache your stylesheet. If you update your stylesheet, you should use a cachebreaker in the URL to the stylesheet, typically by appending a version number to the .CSS file extension, as in http://www.example.com/my.css?2.

So I'm trying to understand: if I have the stylesheet as /test.css do I keep that file named that, but only but the "?#" at the end of the link to the stylesheet, but not actually change the stylesheet name?

+1  A: 

Right, caching is performed by facebook checking to see if it has the requested file available (versus your remote copy). By appending the ?xxx to the link href tag, you are essentially breaking that check and telling it that the file will be different than when requested before.

Chris Thompson
cool. Thanks! Works perfectly.
Joel
@Joel Great! Happy to help!
Chris Thompson