diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-02-15 12:51:54 -0500 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-02-15 12:53:11 -0500 |
commit | 09ba8bb752171fe02c67c7983bc8ceeab63f804c (patch) | |
tree | 5c156d5c79d5ac8ae762797370cbd5d5909b310e /src | |
parent | ca0f9142e9dea13e25f534866cdd96ff0ba39489 (diff) | |
download | pfsense-09ba8bb752171fe02c67c7983bc8ceeab63f804c.zip pfsense-09ba8bb752171fe02c67c7983bc8ceeab63f804c.tar.gz |
Fixed: #7251
Force JS and CSS files to reload if hte file mtimes change
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/foot.inc | 16 | ||||
-rw-r--r-- | src/usr/local/www/head.inc | 7 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/usr/local/www/foot.inc b/src/usr/local/www/foot.inc index 5037860..06764d3 100644 --- a/src/usr/local/www/foot.inc +++ b/src/usr/local/www/foot.inc @@ -37,13 +37,15 @@ </div> </footer> - <script src="/vendor/jquery/jquery-1.12.0.min.js"></script> - <script src="/vendor/jquery/jquery-ui-1.11.4.min.js"></script> - <script src="/vendor/bootstrap/js/bootstrap.min.js"></script> - <script src="/js/pfSense.js"></script> - <script src="/js/pfSenseHelpers.js"></script> - <script src="/js/polyfills.js"></script> - <script src="/vendor/sortable/sortable.js"></script> + <!-- This use of filemtime() is intended to fool the browser into reloading the file (not using the cached version) if the file is changed --> + + <script src="/vendor/jquery/jquery-1.12.0.min.js?v=<?=filemtime('/usr/local/www/vendor/jquery/jquery-1.12.0.min.js')?>"></script> + <script src="/vendor/jquery/jquery-ui-1.11.4.min.js?v=<?=filemtime('/usr/local/www/vendor/jquery/jquery-ui-1.11.4.min.js')?>"></script> + <script src="/vendor/bootstrap/js/bootstrap.min.js?v=<?=filemtime('/usr/local/www/vendor/bootstrap/js/bootstrap.min.js')?>"></script> + <script src="/js/pfSense.js?v=<?=filemtime('/usr/local/www/js/pfSense.js')?>"></script> + <script src="/js/pfSenseHelpers.js?v=<?=filemtime('/usr/local/www/js/pfSenseHelpers.js')?>"></script> + <script src="/js/polyfills.js?v=<?=filemtime('/usr/local/www/js/polyfills.js')?>"></script> + <script src="/vendor/sortable/sortable.js?v=<?=filemtime('/usr/local/www/vendor/sortable/sortable.js')?>"></script> <script type="text/javascript"> //<![CDATA[ diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index 297ec5a..27fb8f7 100644 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -54,9 +54,10 @@ if (!isset($config['system']['webgui']['dashboardcolumns'])) { <html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="/vendor/font-awesome/css/font-awesome.min.css"> - <link rel="stylesheet" href="/vendor/sortable/sortable-theme-bootstrap.css"> - <link rel="stylesheet" href="<?=$cssfile?>" /> + <link rel="stylesheet" href="/vendor/font-awesome/css/font-awesome.min.css?v=<?=filemtime('/usr/local/www/vendor/font-awesome/css/font-awesome.min.css')?>"> + <link rel="stylesheet" href="/vendor/sortable/sortable-theme-bootstrap.css?v=<?=filemtime('/usr/local/www/vendor/sortable/sortable-theme-bootstrap.css')?>"> + <link rel="stylesheet" href="<?=$cssfile?>?v=<?=filemtime('/usr/local/www/' . $cssfile)?>" /> + <title><?=$tabtitle?></title> <script type="text/javascript"> //<![CDATA[ |