Question

I am testing this website סוכנות דוגמנות with YSlow (firebug).

I have only 1 (last) issue to fix (score 99 instead of 100).

There is 1 static component without a far-future expiration date. enter code here(2013/7/26) http://static.dugmanut.net/min/?b=js&f=jquery.js,infinite-rotator.js,innerfade.js,cycle-plugin.js,bkpos.js,background.js,rotate_text.js

Now the problem is that I'm using google minify to merge all my js files into a single line request.

Is there a quick fix for this?

Was it helpful?

Solution

There is a potential caching issue here.

If you change any of the scripts visitors, who have the minified script in their cache, will not get the new version of the script.

One way to fix this is by using a fingerprint. Each version has a different fingerprint.

Like: min?scripta,scriptb,finger12345

Then, when you release a new version of the scripts you make a new fingerprint, ex:

min?scripta,scriptb,finger12346

The fingerprinted script can have a far-future expiration time. If the resource is updated, you'll have a new fingerprint and caching issues are avoided.

You'll need to know when to generate a new fingerprint:

  • You can look at the last-modified-times of the files
  • or keep a version that you increment whenever you deploy new code
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top