2 Stps to Increase Website Speed

5 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 :

<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript

# 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

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

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
Avatar of Unregistered
  • 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
    Great information to enhance website speed.
    {{ DiscussionBoard.errors[11422521].message }}
  • Profile picture of the author elizabethcarr
    • Optimize IMAGES
    Your homepage should lead with high-quality images to capture attention, but they can drag down your site speed. If you aren't displaying them in full size then you should scale them appropriately to reduce your page load times.
    • Enable CACHING
    Once your website is setup for caching, visitors will store the elements of your website on their hard drive in a cache or temporary storage. The next time they visit your site, their browser can load the page without needing to send all those HTTP requests to the server.
    {{ DiscussionBoard.errors[11438843].message }}
  • GTmetrix is a great resource too, for finding content that can be optimized (i.e. images, CSS, etc). It's worth checking out.

    - Ethernet Servers Limited
    -- SSD cPanel Web Hosting w/ LiteSpeed, MariaDB, CloudLinux & MultiPHP
    --- Dual E5 OpenVZ Virtual Servers w/ KernelCare
    ---- Fully Managed cPanel VPS w/ Softaculous & Daily Backups

    {{ DiscussionBoard.errors[11439276].message }}
Avatar of Unregistered

Trending Topics