Created
August 22, 2011 07:42
-
-
Save yatil/1161869 to your computer and use it in GitHub Desktop.
Using beanstalks .revision file to assure that the latest CSS gets to the browsers when using aggressive caching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$content = file('/path/to/.revision'); | |
//First line: $content[0]; | |
define('REV',trim($content[0])); | |
?> | |
<link rel="stylesheet" href="style.css?v=<?=REV?>"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was wondering what this file was! This is excellent, thanks for the gist, it will work perfectly.