Module: appdb Branch: master Commit: d0c1f087ca8eecc52f3636254a90f5c45cd87390 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=d0c1f087ca8eecc52f3636254...
Author: Jeremy Newman jnewman@codeweavers.com Date: Tue Nov 22 10:12:06 2016 -0600
fix caching issues with JS/CSS
---
include/header.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/header.php b/include/header.php index d607cdc..1df07cc 100644 --- a/include/header.php +++ b/include/header.php @@ -2,6 +2,11 @@ /*********************************/ /* Application Database - Header */ /*********************************/ + +// get file modification time for local CSS/JS to fix caching issues +$iCSStime = filemtime(BASE."styles.css"); +$iJStime = filemtime(BASE."utils.js"); + ?><!doctype html> <html lang="en"> <head> @@ -18,12 +23,12 @@ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css"> <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.min.css" type="text/css" media="all"> - <link rel="stylesheet" href="<?php echo BASE; ?>styles.css" type="text/css" media="all"> + <link rel="stylesheet" href="<?php echo BASE; ?>styles.css?f=<?php echo $iCSStime; ?>" type="text/css" media="all">
<script src="https://code.jquery.com/jquery-2.2.3.min.js" type="text/javascript"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js" type="text/javascript"></script> - <script src="<?php echo BASE; ?>utils.js"></script> + <script src="<?php echo BASE; ?>utils.js?f=<?php echo $iJStime; ?>"></script>
<link rel="shortcut icon" type="image/png" href="<?php echo BASE; ?>images/winehq_logo_16.png"> <link title="AppDB" type="application/opensearchdescription+xml" rel="search" href="<?php echo BASE; ?>opensearch.xml">