Agony Posted June 1, 2014 Share Posted June 1, 2014 <IfModule mod_expires.c>ExpiresActive OnExpiresByType image/jpg "access 1 week"ExpiresByType image/jpeg "access 1 week"ExpiresByType image/gif "access 1 week"ExpiresByType image/png "access 1 week"ExpiresByType text/css "access 1 week"ExpiresByType text/html "access 1 week"ExpiresByType application/pdf "access 1 week"ExpiresByType text/x-javascript "access 1 week" ExpiresByType text/javascript "access 1 week" ExpiresByType application/javascript "access 1 week" ExpiresByType application/x-javascript "access 1 week"ExpiresByType text/plain "access 1 week"ExpiresByType application/json "access 1 week"ExpiresByType application/x-shockwave-flash "access 1 week"ExpiresByType image/x-icon "access 1 week"ExpiresByType application/x-font-woff "access 1 week"ExpiresDefault "access 1 week"</IfModule> in apache that works nicely - clean and simple.But all iv found this far in iis is an option that caches EVERYTHING - or some web.config option u can edit for every file manually. This is no good for dynamic site.Can you specify mime /filetypes like that with expire time? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 2, 2014 Share Posted June 2, 2014 Specifying everything in web.config is the same as what you see with Apache. The list of possible mime types should not change often, but if there's a new one then that is what the default is for. Your example for Apache is redundant, it's setting the expiration to 1 week for everything. Might as well leave out the list of mime types and just have the default. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now