Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Using beanstalks .revision file to assure that the latest CSS gets to the browsers when using aggressive caching
<?php
$content = file('/path/to/.revision');
//First line: $content[0];
define('REV',trim($content[0]));
?>
<link rel="stylesheet" href="style.css?v=<?=REV?>">
@LukePettway
Copy link

LukePettway commented Dec 30, 2015

I was wondering what this file was! This is excellent, thanks for the gist, it will work perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment