Knowledge Base
All Categories How to's Improve Slow Page load

Improve Slow Page load

In order to improve the page loading time you can add some caching options within your .htaccess file. 

Just copy the settings below and add them into your .htaccess:

#Deflate
<ifmodule mod_deflate.c>
<ifmodule mod_mime.c>
Addtype font/opentype .otf
Addtype font/eot .eot
Addtype font/truetype .ttf
AddType image/svg+xml svg svgz
</ifmodule>
AddOutputFilterByType DEFLATE image/svg+xml text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript font/truetype font/opentype application/x-font-woff
</ifmodule>
#End Deflate

#Gzip
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
#End Gzip

#Font caching
<ifModule mod_headers.c>
<filesMatch "\\.(ttf|otf|woff)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>

<filesMatch "\\.(html|php)$">
     Header unset ETag
     Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
     Header set Pragma "no-cache"
     Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</filesMatch>
</ifModule>

Was this article helpful?

Thanks for your feedback!