Commit: f33391c3cedb162c129297afd3886f0810318a27 Author: Adam Harvey <[email protected]> Wed, 20 Nov 2013 15:01:51 -0800 Parents: 4c9addfe675d42168d827b7887563db26a3522f7 Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=f33391c3cedb162c129297afd3886f0810318a27 Log: Shamelessly steal bjori's code to handle JS caching as well. Changed paths: M include/footer.inc Diff: diff --git a/include/footer.inc b/include/footer.inc index 47c5f1b..b57afca 100644 --- a/include/footer.inc +++ b/include/footer.inc @@ -60,12 +60,21 @@ })(window); </script> + <!-- External and third party libraries. --> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript" src="/js/ext/hogan-2.0.0.min.js"></script> <script type="text/javascript" src="/js/ext/typeahead.min.js"></script> - <script type="text/javascript" src="/js/search.js?t=20131120"></script> - <script type="text/javascript" src="/js/common.js?t=20131120a"></script> - <?php include 'uservoice.inc' ?> + + <?php + // Nick bjori's last modified code for our own JS files. + $jsfiles = array('search.js', 'common.js'); + foreach ($jsfiles as $filename) { + $path = dirname(dirname(__FILE__)).'/js/'.$filename; + echo '<script type="text/javascript" src="/js/'.$filename.'?t='.@filemtime($path).'"></script>'; + } + + include 'uservoice.inc'; + ?> </body> </html> -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
