Skip to main content
speed-optimisation-methods-to-prevent-your-website-speed

Few Speed Optimisation methods to prevent your website speed

Whenever launching your website you have Few Speed Optimisation Methods to Prevent your Website Speed.

Simply follow the Instructions below.

Log on to your File Manager or FTP server.

Download and Save the copy of .htaccess file for backup.

Edit the file with the below additions. *Note: Do not delete this file or erase already written contents from this file or you will get site error.

Add Expires Header

Paste the following code at the end of the file.

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>

Disable Hotlinking your website Images

Paste the following code at the end of the file.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?ventureharbour.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

Deactivate Unused plugins to prevent your website speed

If your Website is having non-required plugins, make it de-activate.

Enable Keep Alive

Paste the following code at the end of the file.

<ifModule mod_headers.c>
    Header set Connection keep-alive
</ifModule>

Compress all static files with gzip

Paste the following code at the end of the file.

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Or, compress certain file types by extension:

SetOutputFilter DEFLATE

Now save it and check your website whether it is running properly, Use Pingdom, GTMatrix tools for page speed testings. you are almost done with Few Simple Speed Optimisation Methods to Prevent your Website Speed while you setup your site. Stay tuned to learn more.