Facebook caches the stylesheet for any application you make. This means that for every tweak you make to the CSS, you have to remember to increment the version number before you see the changes. This is very annoying and slows down development no end.
To get around it, write the CSS in an external php file which is then included in the header of the application, which runs across all the pages of the app.
CSS file:
echo '
<style type="text/css">
img
{
border: none;
}
</style>
';
And the php which calls it:
include_once 'style.inc.php';
Yes CSS syntax highlighting is lost but that’s a small price to pay. It also means the CSS can take advantage of the dynamic nature of php, making it easier to use in the future on new apps:
In the php header (before the CSS is included):
$appcanvasurl = 'http://yourapp_canvas_url';
include_once 'style.inc.php';
And the CSS taking advantage of this:
echo '
<style type="text/css">
#container
{
background-image: url('.$appcanvasurl.'/images/bg_texture.gif);
height: 500px;
width: 759px;
}
</style>
Popularity: 14% [?]