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:

<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
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
#End Deflate

<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.*
#End Gzip

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

<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"

Was this article helpful?