I am trying to speed up the loading of my site. I used the tool YSlowto analyze the website and check out some of the improvements. My first step is to cache static files. So I want to set the expires headers for the javascript file, but this will not work. I have included javascript in HTML as follows:
<script type="text/javascript" src="//a.ph3nx.com/b.js"></script>
Then I modified the Apache2 httpad.conf file as follows:
ExpiresActive On
ExpiresDefault "access plus 1 minutes"
ExpiresByType text/javascript "access plus 12 months"
The problem is that the javascript file still has a validity period of 1 minute. Hope you can help me, thanks!
Decision:
ExpiresByType application/javascript "access plus 12 months"
ph3nx source
share