]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6129 Browser cache must be forcibly reset at each new version of SonarQube
authorStas Vilchik <vilchiks@gmail.com>
Wed, 4 Feb 2015 12:37:59 +0000 (13:37 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 4 Feb 2015 12:38:07 +0000 (13:38 +0100)
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb

index be7b6ade97e752c9ef16ac21731614d7f4c96589..de953be5a51b35dd6a13d48618e1facaa9037549 100644 (file)
@@ -18,7 +18,7 @@
   %>
   <title><%= title -%></title>
 
-  <link href="<%= ApplicationController.root_context -%>/css/sonar.css" rel="stylesheet" media="all">
+  <link href="<%= ApplicationController.root_context -%>/css/sonar.css?v=<%= sonar_version -%>" rel="stylesheet" media="all">
   <%= yield :style -%>
 
   <script>
@@ -29,7 +29,7 @@
     window.SS.user = '<%= current_user.login if current_user -%>';
     window.SS.userName = '<%= current_user.name if current_user -%>';
   </script>
-  <script src="<%= ApplicationController.root_context -%>/js/sonar.js"></script>
+  <script src="<%= ApplicationController.root_context -%>/js/sonar.js?v=<%= sonar_version -%>"></script>
   <script>
     var baseUrl = '<%= ApplicationController.root_context -%>';
     var $j = jQuery.noConflict();
     moment.lang(window.pageLang);
     numeral.language(window.pageLang);
   </script>
-  <script src="<%= ApplicationController.root_context -%>/js/require.js"></script>
+  <script src="<%= ApplicationController.root_context -%>/js/require.js?v=<%= sonar_version -%>"></script>
   <script>
-    requirejs.config({ baseUrl: baseUrl + '/js' });
+    requirejs.config({
+      baseUrl: baseUrl + '/js',
+      urlArgs: 'v=<%= sonar_version -%>'
+    });
   </script>
   <%= yield :script -%>
 </head>