With PHP running on Apache I have been accustomed to setting cache times via the .htaccess file like this:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 month"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES CACHING ##
Now I am using Node.js (CentOS / cPanel setup on VPS) then .htaccess becomes pretty irrelevant
I have noticed recently that the amount of .js and .css loaded by some web pages is negatively impacting on load times and thought this may help
Is there a node equivalent to force caching of these resources?
Google seems pretty unproductive on this topic
Community Page
Last updated:
Last updated: