Skip to content

Commit

Permalink
- normalize javascript mimetype to application/javascript. Reduces cr…
Browse files Browse the repository at this point in the history
…uft. Thx @danbeam for the work. Fixes #485

Signed-off-by: smooth-graphics <info@novolo.de>
  • Loading branch information
smooth-graphics committed Aug 1, 2011
1 parent f386a95 commit 3e28150
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ht.access
Expand Up @@ -157,6 +157,11 @@ RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Proper MIME type for all files
# ----------------------------------------------------------------------

# JavaScript
# Normalize to standard type (it's sniffed in IE anyways)
# tools.ietf.org/html/rfc4329#section-7.2
AddType application/javascript js

# audio
AddType audio/ogg oga ogg

Expand Down Expand Up @@ -228,14 +233,12 @@ AddType application/octet-stream safariextz
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
Expand All @@ -250,7 +253,7 @@ AddType application/octet-stream safariextz
<IfModule !mod_filter.c>
# Legacy versions of Apache
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
Expand Down Expand Up @@ -319,7 +322,6 @@ AddType application/octet-stream safariextz
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"

<IfModule mod_headers.c>
Header append Cache-Control "public"
Expand Down

0 comments on commit 3e28150

Please sign in to comment.