Archive for May, 2012

Improve website performance

May 24, 2012 3 comments
  1. JavaScript Optimization
    • Place javascript at the bottom of the html.
    • Use Minify JavaScript
    • Alway write JavaScript in external file
    • Try to reduce number of JavaScript files.
  2. CSS Optimization
    • Place CSS at the top of html
    • Use Minify Css
    • Alway write css in external file.
    • Try to reduce number of css files.
  3. SERVER Optimization
    • Alway enable gzip/bzip2 compression.
    • Use this code in .htaccess filemod_gzip_on Yesmod_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.*
%d bloggers like this: