diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2018-12-14 20:33:28 +0100 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2018-12-14 20:33:28 +0100 | 
| commit | 604a55632c5651a40a828734de313ad1dcf47efa (patch) | |
| tree | 4e7b709cc3b1c392f0ac1b77f094cb511220d6aa | |
| parent | c2136e80cc6c1646dfe1de274e9e2b3a20f8dd25 (diff) | |
append version to frequently changed resources to avoid caching issues
| -rw-r--r-- | index.pl | 1 | ||||
| -rw-r--r-- | templates/layouts/default.html.ep | 8 | 
2 files changed, 5 insertions, 4 deletions
@@ -17,6 +17,7 @@ use utf8;  no if $] >= 5.018, warnings => 'experimental::smartmatch';  our $VERSION = qx{git describe --dirty} || '0.05'; +chomp $VERSION;  my %default = (  	backend => 'iris', diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 163955b..146c3c0 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -9,16 +9,16 @@  % } -	%= stylesheet '/static/default.css' +	%= stylesheet "/static/default.css?v=${version}"  	%= stylesheet '/static/jquery-ui.min.css'  % my $force_mobile = param('force_mobile') // -1;  % if ($force_mobile == 1 or ($self->browser->mobile and $force_mobile != 0)) { -	%= stylesheet '/static/mobile.css' +	%= stylesheet "/static/mobile.css?v=${version}"  % }  	%if (stash('load_marquee')) {  	%= javascript '/static/jquery-1.10.2.min.js'  	%= javascript '/static/jquery-ui.min.js' -	%= javascript '/static/dbf.min.js' +	%= javascript "/static/dbf.min.js?v=${version}"  	%= javascript '/static/marquee.min.js'  	%= javascript begin  	$(function () {  $('marquee').marquee() }); @@ -26,7 +26,7 @@  	% } else {  	%= javascript '/static/jquery-1.10.2.min.js', defer => undef  	%= javascript '/static/jquery-ui.min.js', defer => undef -	%= javascript '/static/dbf.min.js', defer => undef +	%= javascript "/static/dbf.min.js?v=${version}", defer => undef  	% }  	% if (stash('with_geolocation')) {  	%= javascript '/static/geolocation.min.js', defer => undef  | 
