I was writing HTML in the static FBML app for a Facebook Page, when the changes I made to my CSS-file didn’t show up on the actual page. After double checking that it wasn’t the CSS that was screwed, I discovered that Facebook stores the imported CSS in a cache, so that it doesn’t have to send an external request every time someone looks at the page. That is probably a very good thing to do, but how could I tell Facebook that I had made changes to the CSS, without renaming the file every time?
Well the solution wasn’t that far off. When you use an external CSS-file, you use a standard link-tag like this:
<link rel="stylesheet" type="text/css" href="http://domain.com/css/facebook.css" />
What you need to do is add a version variable to the tag, like this:
<link rel="stylesheet" type="text/css" href="http://www.domain.com/css/facebook.css?v=1.1" />
So every time you make CSS-changes, you have to edit the link tag in the static FBML app with a new version (1.2, 1.3 and so on), telling Facebook it is time to have a look at the file with fresh eyes.
I learn something new every day.

Latest Comments