Small changes regarding static resources caching

master
Daniel Berteaud 10 years ago
parent f30a1e4de5
commit a2c65ad26c
  1. 3
      conf/httpd_alias.conf
  2. 3
      conf/httpd_vhost.conf
  3. 14
      public/js/vroom.js
  4. 2
      vroom.pl

@ -39,9 +39,6 @@ ProxyPassReverse /vroom/ http://127.0.0.1:8090/
</IfModule> </IfModule>
ExpiresActive on ExpiresActive on
ExpiresDefault "access plus 1 month" ExpiresDefault "access plus 1 month"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType text/html "access plus 0 seconds" ExpiresByType text/html "access plus 0 seconds"
</Directory> </Directory>
# You should customize this part to access the admin interface # You should customize this part to access the admin interface

@ -45,9 +45,6 @@
</IfModule> </IfModule>
ExpiresActive on ExpiresActive on
ExpiresDefault "access plus 1 month" ExpiresDefault "access plus 1 month"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType text/html "access plus 0 seconds" ExpiresByType text/html "access plus 0 seconds"
</Location> </Location>
# You should customize this part to access the admin interface # You should customize this part to access the admin interface

@ -36,24 +36,14 @@ var webrtc = undefined;
$('#lnk_' + page).addClass('active'); $('#lnk_' + page).addClass('active');
// Localize the strings we need // Localize the strings we need
$.ajax({ $.getJSON(rootUrl + 'localize/' + currentLang, function(data){
url: rootUrl + 'localize/' + currentLang,
type: 'GET',
dataType: 'json',
success: function(data) {
locale = data; locale = data;
}
}); });
// If current locale isn't EN, retrieve EN locale as a fallback // If current locale isn't EN, retrieve EN locale as a fallback
if (currentLang !== 'en'){ if (currentLang !== 'en'){
$.ajax({ $.getJSON(rootUrl + 'localize/en' , function(data){
url: rootUrl + 'localize/en',
type: 'GET',
dataType: 'json',
success: function(data) {
def_locale = data; def_locale = data;
}
}); });
} }

@ -1298,8 +1298,6 @@ get '/localize/:lang' => { lang => 'en' } => sub {
$strings->{$string} = $self->l($string); $strings->{$string} = $self->l($string);
} }
$self->languages($l); $self->languages($l);
# Tell the client to cache it
$self->res->headers->cache_control('private,max-age=3600');
return $self->render(json => $strings); return $self->render(json => $strings);
}; };

Loading…
Cancel
Save