Skip to content

Commit 9e6e60c

Browse files
committed
Removed Cache from htaccess. Cache should only be enabled if the user wants it. Having it on by default causes more issues than the good it brings.
1 parent c37ff7a commit 9e6e60c

File tree

1 file changed

+0
-72
lines changed

1 file changed

+0
-72
lines changed

.htaccess

-72
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,6 @@ ModPagespeedEnableFilters collapse_whitespace,remove_comments
7474
</IfModule>
7575
# We also want to compress / minify CSS, Images, Remove HTML Whitespace and Comments
7676

77-
#Alternative caching using Apache's "mod_headers", if it's installed.
78-
#Caching of common files - ENABLED
79-
<IfModule mod_headers.c>
80-
81-
# 1 Month
82-
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
83-
Header set Cache-Control "max-age=2592000, public"
84-
</FilesMatch>
85-
86-
# 2 DAYS
87-
<FilesMatch "\.(xml|txt)$">
88-
Header set Cache-Control "max-age=172800, public, must-revalidate"
89-
</FilesMatch>
90-
91-
# 2 HOURS
92-
<FilesMatch "\.(html|htm)$">
93-
Header set Cache-Control "max-age=7200, must-revalidate"
94-
</FilesMatch>
95-
96-
</IfModule>
97-
9877
# Headers Module start
9978
<IfModule mod_headers.c>
10079
<FilesMatch "\.(js|css|xml|gz|html|ttf)$">
@@ -116,57 +95,6 @@ Header set Cache-Control "max-age=7200, must-revalidate"
11695
</IfModule>
11796
# Gzip Compression end
11897

119-
# Cache Start
120-
<IfModule mod_expires.c>
121-
ExpiresActive on
122-
123-
# Perhaps better to whitelist expires rules? Perhaps.
124-
ExpiresDefault "access plus 1 month"
125-
126-
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
127-
ExpiresByType text/cache-manifest "access plus 0 seconds"
128-
129-
# Your document html
130-
ExpiresByType text/html "access plus 0 seconds"
131-
132-
# Data
133-
ExpiresByType application/json "access plus 0 seconds"
134-
ExpiresByType application/xml "access plus 0 seconds"
135-
ExpiresByType text/xml "access plus 0 seconds"
136-
137-
# Feed
138-
ExpiresByType application/atom+xml "access plus 1 hour"
139-
ExpiresByType application/rss+xml "access plus 1 hour"
140-
141-
# Favicon (cannot be renamed)
142-
ExpiresByType image/x-icon "access plus 1 week"
143-
144-
# Media: images, video, audio
145-
ExpiresByType audio/ogg "access plus 1 month"
146-
ExpiresByType image/gif "access plus 1 month"
147-
ExpiresByType image/jpeg "access plus 1 month"
148-
ExpiresByType image/png "access plus 1 month"
149-
ExpiresByType video/mp4 "access plus 1 month"
150-
ExpiresByType video/ogg "access plus 1 month"
151-
ExpiresByType video/webm "access plus 1 month"
152-
153-
# HTC files (css3pie)
154-
ExpiresByType text/x-component "access plus 1 month"
155-
156-
# Webfonts
157-
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
158-
ExpiresByType application/x-font-ttf "access plus 1 month"
159-
ExpiresByType application/x-font-woff "access plus 1 month"
160-
ExpiresByType font/opentype "access plus 1 month"
161-
ExpiresByType image/svg+xml "access plus 1 month"
162-
163-
# CSS and JavaScript
164-
ExpiresByType application/javascript "access plus 1 year"
165-
ExpiresByType text/css "access plus 1 year"
166-
167-
</IfModule>
168-
#Cache End
169-
17098
# Keep Alive start
17199
<IfModule mod_headers.c>
172100
Header set Connection keep-alive

0 commit comments

Comments
 (0)