Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Problems when adding revision to CSS/JS names

$
0
0
Hi,
I have "inherited" the Steal code in the system I'm working on. While working on adding revison to the file names of CSS and JS files loaded to be able to increase caching times without running into the problem of having CDN, proxies and browser use an outdated version I'm running into problems with Steal which I need some help fixing.

I don't want to use ?rev=12345 as it's not a good solution in our setup. Instead I'm adding a ~r12345 part in the reference to the CSS/JSS. Like this:

<script src="css/mycssfile~r12345.js" />

Then I use a rewrite to strip the version part.

However, when trying to add this to steal.production.js (steal.production~r12345.js) I'm running into problems.

My steal loading code looks like this:

  1. <script type="text/javascript">
  2. steal = {
  3. app: 'ericsson',
  4. loaded : ['/mydirectory/production~r0000.css'],
  5. production: '/mydirectory/production~r0000.js'
  6. }
  7. </script>
  8. <script src="mydirectory/steal/steal.production~r0000.js"></script>


Any idea why this is not working?

Thanks!
/Per

Viewing all articles
Browse latest Browse all 3491

Trending Articles