Search code examples
google-code

How to set expiration of google code?


I host jquery from google code. When I check the site with page speed, I get this result:

jquery-1.4.4.min.js (expiration not specified)

How can I set an expiration time for this file?


Solution

  • You can't. I'd instead switch to fetching jquery via the Google Libraries API: http://code.google.com/apis/libraries/devguide.html.

    That service is designed for low latency and high availability: it has all the appropriate cache headers set, is served from a CDN, etc. Google Code's subversion hosting will serve the file for you, but it was designed with slightly different objectives and won't work as well for this case.