Selamat Datang

Tips Mempercepat Loading Web dengan .htaccess

Ada banyak cara dalam mempercepat server response time, salah satunya dengan menggunakan gzip compression. Tutorial kali ini diperuntukkan bagi sobat yang menggunakan hosting linux dengan server apache.
Langkah-langkah yang diperlukan untuk meng-enable gzip compression adalah sebagai berikut:

  1. Buka folder root html Anda dengan Cpanel atau FTP Client. Folder root html biasanya ditempatkan di home/username/public_html.
  2. Cari file .htaccess
  3. tambahkan beberapa baris perintah berikut pada file .htaccess Anda:
    <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.*
    </ifModule>
     

    # 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
    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 text/css .css

  4. Save .htaccess

Selain untuk mempercepat server response time, cara ini juga sangat berguna untuk menunjang SEO website Anda karena salah satu kriteria SEO adalah response time dari web tersebut.

Semoga bermanfaat


Desain web murah | Web Instant | Web Toko Online | Pemesanan hubungi : 021-44560674 View all posts by Bestariweb Studio

Other Resources

External resources related Web Design, Web Development & Graphic Design that covered free resources, tips & tricks, workflow, articles, etc

55+ Outline Styled Vector Icons Gratis!


Feb 21st, 2014 Comments Off on 55+ Outline Styled Vector Icons Gratis!

Free CMS for photographers, designers, and creative DIYs


Mar 25th, 2013 Comments Off on Free CMS for photographers, designers, and creative DIYs

Code School : Two Days of Learning for Free


Mar 25th, 2013 Comments Off on Code School : Two Days of Learning for Free

Delete Duplicate Records from Table MySQL


Jan 3rd, 2014 Comments Off on Delete Duplicate Records from Table MySQL

Basic jQuery Slider


Jun 9th, 2013 Comments Off on Basic jQuery Slider

Cara Install Git, Node, Grunt, Sass, Compass & Susy di Windows PC


Jan 6th, 2015 Comments Off on Cara Install Git, Node, Grunt, Sass, Compass & Susy di Windows PC

Script Login, Register, Logout Dengan PHP dan MySQL


Aug 29th, 2013 Comments Off on Script Login, Register, Logout Dengan PHP dan MySQL

Bagaimana Membuat Homepage Dalam 3 Menit di Photoshop


Jan 10th, 2015 Comments Off on Bagaimana Membuat Homepage Dalam 3 Menit di Photoshop

On-page SEO: Factors, Tips and Techniques


Mar 25th, 2013 Comments Off on On-page SEO: Factors, Tips and Techniques

Free | Almost Flat Dark UI Pack


May 20th, 2013 Comments Off on Free | Almost Flat Dark UI Pack

Klik Tombol Like / Suka ya kawan..

Klik tombol "Like" atau "Suka" untuk mendapatkan update tutorial, tips & tricks serta info terbaru seputar dunia web design & development