2 Stps to Increase Website Speed

4 replies
NOTICE: This code work with Apache server for PHP/ HTML Websites
---------------------------------------------------------------------------------------------

First of All , Enable images compression on your website once loaded on browser , First of All , Add these line to .htacess file then upload it to your website directory :


Code:
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP 



# 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
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
AddOutputFilterByType DEFLATE image/svg+xml
AddType x-font/otf .otf
AddType x-font/ttf .ttf
AddType x-font/eot .eot
AddType x-font/woff .woff
AddType image/x-icon .ico
AddType image/png .png
AddType image/jpg .jpg
AddType image/gif .gif
AddType image/bmp .bmp
AddType image/jpeg .jpeg
AddType text/plain .txt
AddType text/xsd .xsd
AddType text/xsl .xsl
AddType text/xml .xml


# Allow install .xpi Mozilla Addons"
AddType application/x-xpinstall .xpi

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##

2nd Step :
Easy and Simple, if your website use : Images, Header, background, thumbnail, topic picture, icons


Download All pictures by FTP to your Computer, then Compress these pictures by using this awesome tool : https://tinypng.com/



  • you can upload 20 picture for instant compression without loss , keeping the same dimensions and same name.
  • it will reduce up 80% from original size.



For example a background image : 1.00 MO can be reduced to 233kb





That's it, i hope that short tutorial will be useful.
#increase #speed #stps #website
  • Profile picture of the author Michael D Price
    Images
    You can also include many images into one file(sprites), and use css to display only certain sections of the image.

    Fewer network calls.
    Scripts that I write, that require many css and js includes, get loaded through a parser, so Its only 1 single url call. While this call will take longer to perform, it doesnt have to wait in line to process.
    {{ DiscussionBoard.errors[11410888].message }}
  • Profile picture of the author mgrokhotov
    I prefer to use some techniques to convert images "on-fly". For example, generate thumbnails (phpthumbof etc).
    Also, good practice is to minify JS and CSS.
    {{ DiscussionBoard.errors[11419202].message }}
  • Profile picture of the author bensmith12
    Hi,
    Great information to enhance website speed.
    Thanks.
    {{ DiscussionBoard.errors[11422521].message }}
  • Profile picture of the author Ethernet Servers
    GTmetrix is a great resource too, for finding content that can be optimized (i.e. images, CSS, etc). It's worth checking out.
    Signature

    ~]# Ethernet Servers Ltd - Est. 2014! - sales @ ethernetservers.com
    ~]# Try out our WordPress speed tests for yourself!
    ~]# NVMe Web Hosting | Unmanaged VPS | Fully Managed VPS | Dedicated Servers | Domain Names
    ~]# Don't settle for any less than the very best - come & join our family today!

    {{ DiscussionBoard.errors[11439276].message }}

Trending Topics