Jump to content

js wont cache


Agony
 Share

Recommended Posts

in the .htaccess iv got the js lines set up as:

ExpiresByType text/x-javascript "access 1 month"  ExpiresByType text/javascript "access 1 month"  ExpiresByType application/javascript "access 1 month" ExpiresByType application/x-javascript "access 1 month"

to cover all the possible diff mimes.

<script type="text/javascript" src="http://cdn.ink.sapo.pt/3.0.2/js/holder.js"></script><script type="text/javascript" src="http://cdn.ink.sapo.pt/3.0.2/js/ink-all.min.js"></script><script type="text/javascript" src="http://cdn.ink.sapo.pt/3.0.2/js/autoload.js"></script>That's how its defined, yet they don't seem to cache.

 

Leverage browser caching for the following cacheable resources:http://cdn.ink.sapo.pt/3.0.2/js/autoload.js (6 hours)http://cdn.ink.sapo.pt/3.0.2/js/holder.js (6 hours)http://cdn.ink.sapo.pt/3.0.2/js/ink-all.min.js (6 hours)

Any ideas what might be breaking it?

Edited by Agony
  • Like 1
Link to comment
Share on other sites

edit converted those to minified versions and added few extra mime types - it seems to be caching them now.

 

 

however i cant seem to get the

nk-all.min.map

to cache - chrome dev tools report it as text/plain and i even added a line to htaccess for it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...