From a5bc7d20d4150c30dd70b33120ee062ede1f7d96 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 9 Nov 2013 01:50:42 +0100 Subject: Évite les problèmes de cache des resources CSS et JS statiques MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajoute une date automatique aux CSS et JS. Ne devrait pas entraver la bonne mise en cache grâce aux entêtes HTTP dont `Cache-Control: public` --- app/controllers/indexController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/indexController.php') diff --git a/app/controllers/indexController.php b/app/controllers/indexController.php index 5dd847f34..a569c3227 100755 --- a/app/controllers/indexController.php +++ b/app/controllers/indexController.php @@ -46,10 +46,10 @@ class indexController extends ActionController { Request::_param ('output', $output); } - View::appendScript (Url::display ('/scripts/shortcut.js')); + View::appendScript (Url::display ('/scripts/shortcut.js?' . filemtime(PUBLIC_PATH . '/scripts/shortcut.js'))); if ($output == 'global') { - View::appendScript (Url::display ('/scripts/global_view.js')); + View::appendScript (Url::display ('/scripts/global_view.js?' . filemtime(PUBLIC_PATH . '/scripts/global_view.js'))); } } -- cgit v1.2.3