Add timestamp in the path, not as a GET param

Fix #35
master
Daniel Berteaud 11 years ago
parent ecbee1f15c
commit 648a5b01a6
  1. 5
      conf/httpd.conf
  2. 2
      templates/default/header.html.ep
  3. 2
      templates/default/js_common.html.ep
  4. 2
      templates/default/js_room.html.ep

@ -12,7 +12,10 @@
ProxyPassReverse /socket.io/1/websocket ws://localhost:8888/socket.io/1/websocket
ProxyPass /socket.io/ http://localhost:8888/socket.io/
ProxyPassReverse /socket.io/ http://localhost:8888/socket.io/
AliasMatch ^/((js|css|img|fonts|snd)/.*) /opt/vroom/public/$1
AliasMatch ^/(\d{10}/)?((js|css|img|fonts|snd)/.*) /opt/devroom/public/$2
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/(\d{10}/)?(js|css|img|fonts|snd)/(.*)$ /$2/$3 [L]
ScriptAlias / /opt/vroom/public/vroom.pl/
<Location />
require all granted

@ -6,7 +6,7 @@
<%
foreach my $css (qw(bootstrap.min.css vroom.css)){
%>
<link href="/css/<%= $css %>?<%= $self->get_mtime("css/$css") %>" rel="stylesheet" type="text/css">
<link href="/<%= $self->get_mtime("css/$css") %>/css/<%= $css %>" rel="stylesheet" type="text/css">
<% } %>
<link rel="icon" type="image/png" href="/img/favicon.png" />
</head>

@ -3,5 +3,5 @@
</script>
<% foreach my $js (qw(jquery-1.11.1.min.js bootstrap.min.js notify-combined.min.js vroom.js)){
%>
<script type="text/javascript" src="/js/<%= $js %>?<%= $self->get_mtime("js/$js") %>"></script>
<script type="text/javascript" src="/<%= $self->get_mtime("js/$js") %>/js/<%= $js %>"></script>
<% } %>

@ -1,5 +1,5 @@
<%
foreach my $js (qw(simplewebrtc.bundle.js jquery.browser.min.js sprintf.js FileSaver.js)){
%>
<script type="text/javascript" src="/js/<%= $js %>?<%= $self->get_mtime("js/$js") %>"></script>
<script type="text/javascript" src="/<%= $self->get_mtime("js/$js") %>/js/<%= $js %>"></script>
<% } %>

Loading…
Cancel
Save