1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

(Share) Meningkatkan Kecepatan Loading Website

Discussion in 'Freebies' started by vebry_exa, Mar 20, 2014.

  1. vebry_exa

    vebry_exa Super Hero

    Joined:
    Jul 31, 2012
    Messages:
    3,463
    Likes Received:
    215
    Location:
    https://vepay.id
    Semoga threadnya gak double post

    Biar gak panjang lebar, to do point aja ya

    1. Kalau pakai CMS Wordpress install plugins W3 Total Cache atau sejenisnya.

    - Page Cache (Enable)
    - Minify (Enable Manual)
    - Database Cache (Enable)
    - Object Cache (Enable)
    - Browser Cache (Enable)
    - Sisanya (Disable)

    2. Compress CSS template dan CSS yang dianggap kurang optimal oleh Gtmetrix di hxxp://csscompressor.com

    Kalau pakai CMS Wordpress biasanya CSS template berada di Appearance > Editor > style.css

    3. Masukkan kode di bawah ini di .htaccess

    PHP:
    <IfModule mod_deflate.c>
    #The following line is enough for .js and .css
    AddOutputFilter DEFLATE js css

    #The following line also enables compression by file content type, for the following list of Content-Type:s
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml

    #The following lines are to avoid bugs with some browsers
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch 
    ^Mozilla/4\.0[678no-gzip
    BrowserMatch 
    \bMSIE !no-gzip !gzip-only-text/html 
    </IfModule>

    <
    IfModule mod_headers.c>
      <
    FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf|xml|gz)$">
        
    Header append VaryAccept-Encoding
      
    </FilesMatch>
    </
    IfModule>

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

    ## 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 ##
    File .htaccess berada di dalam cpanel anda pada folder public_html, jika tidak ada silahkan buat baru

    -------------------------------------------------

    View attachment 39484

    Semoga bisa membantu :salaman:
     
    Last edited: Mar 20, 2014
    iidbae, workingonit and Dwipangga like this.
  2. dcochanz

    dcochanz Super Hero

    Joined:
    Mar 21, 2011
    Messages:
    2,094
    Likes Received:
    80
    iya ne lumayan terbukti enteng, cm buat csscompressor mending dihindari om, soalnya pngalaman malah ancur themenya, klo dibuka lewat hape malah berantakan :lol:

    jd mending dihindari, trus klo pake cache kyknya ati ati sama htmlnya jgn ke kompres, soalnya iklan GA bisa brubah kodenya klo gk salah, dan itu ngelanggar TOS CMIIW :senyum:
     
  3. dimasku

    dimasku Super Hero

    Joined:
    Aug 6, 2012
    Messages:
    1,296
    Likes Received:
    151
    Location:
    Surabaya
    kalau untuk yg non-WP gmn mas?
     
  4. megahnanda

    megahnanda Ads.id Pro

    Joined:
    Jan 22, 2009
    Messages:
    276
    Likes Received:
    18
    Location:
    lokalisasi
    intinya yang cache2 itu di enable gitu kan :-$
     
  5. idhamyy

    idhamyy Ads.id Pro

    Joined:
    Jun 25, 2013
    Messages:
    320
    Likes Received:
    13
    Location:
    Jakarta
  6. vebry_exa

    vebry_exa Super Hero

    Joined:
    Jul 31, 2012
    Messages:
    3,463
    Likes Received:
    215
    Location:
    https://vepay.id
    Sebenarnya mengkompress CSS hanyalah menghapus tanda baca, spasi, enter berlebihan, dll

    Memang bisa membuat kode CSS templatenya menjadi ruwet

    Kebetulan semua website saya ada GA nya dan kodenya ndak tak rubah jadi aman

    Lumayan kan kalau loading web cepet traffic jadi naik, earning bertambah, gtmetrix-nya juga enak dilihat kalau nilainya A

    Tapi semua kembali ke diri kita masing2, just fun :senyum:

    Coba nomor 3 mas

    Kalau saya malah naik mas, lumayan earning adsense juga naik

    Mungkin tergantung masta settingannya seperti apa, begitupula template juga berpengaruh
     
    Last edited: Mar 20, 2014
  7. masykur

    masykur Ads.id Fan

    Joined:
    Aug 15, 2012
    Messages:
    228
    Likes Received:
    56
  8. Syailendra

    Syailendra Siswa Ads-id

    Joined:
    Jan 14, 2012
    Messages:
    1,179
    Likes Received:
    189
    Location:
    Indonesia
    saya cuma pake wp minifi aman tuh gak rusak tampilan webnya :D
     
  9. autocrack

    autocrack Banned

    Joined:
    Aug 24, 2011
    Messages:
    1,188
    Likes Received:
    37
    Location:
    Tangerang
    Om itu yang d htacces buat apaan ? Buat Gzip juga kah ? soalnya ane juga pernah masukin cara Gzip tapi ga sepanjang itu . yang setting expires cache for image belom ane lakuin I-)
     
  10. sky103

    sky103 Ads.id Fan

    Joined:
    Apr 17, 2013
    Messages:
    171
    Likes Received:
    6
    Location:
    Lhokseumawe
    kalau ane, Page cache w3 total cache ane aktifin, minify sama browser cache. Terus ane pakai cloudflare dgn settingan only CDN. Udah lumayan loadnya :)
     
  11. agustadz

    agustadz Newbie

    Joined:
    Oct 7, 2013
    Messages:
    32
    Likes Received:
    0
    itu htaccess buat ngeaktifkan meme dari hostingnya ya mas?
     
  12. dadada

    dadada Super Hero

    Joined:
    Dec 10, 2013
    Messages:
    2,514
    Likes Received:
    999
    Buat apa fungsi tambahan .htacces itu ?, masih perlukah jika menggunakan w3 total cache?...

    Thx
     
  13. devprolabs

    devprolabs Ads.id Pro

    Joined:
    Mar 2, 2014
    Messages:
    480
    Likes Received:
    14
    Location:
    Jakarta
    ane prnah ngetes kompresi smua nya. eh tampilan web ane jd berantakan. kadang malah slideshow tampilnya agak lama :(
     
  14. vebry_exa

    vebry_exa Super Hero

    Joined:
    Jul 31, 2012
    Messages:
    3,463
    Likes Received:
    215
    Location:
    https://vepay.id
    File .htaccess adalah file konfigurasi yang disediakan oleh web server Apache, yang biasanya digunakan untuk mengubah pengaturan default dari Apache.

    Kode yang saya share di atas bertujuan untuk membuat expired cache untuk media file (jpg, js, css, etc) yang ada di web kita dan menciptakan leverage browser caching. caching

    Jangan dikompress semuanya mas, coba cek di Gtmetrix dulu sebelum kompress, nanti disaranin mana aja yg harus dikompress :senyum:
     
  15. iggoz

    iggoz Ads.id Pro

    Joined:
    Dec 27, 2013
    Messages:
    493
    Likes Received:
    42
    Kalo dicompress again ragu sama tampilan nya, Boleh dicoba yg pertama dulu deh yg simple

    Sent from my GT-I8160 using Tapatalk
     
  16. sirdoyle

    sirdoyle Ads.id Fan

    Joined:
    Aug 29, 2010
    Messages:
    130
    Likes Received:
    6
    Kira2 brp besar hasil kompresnya?
     
  17. vebry_exa

    vebry_exa Super Hero

    Joined:
    Jul 31, 2012
    Messages:
    3,463
    Likes Received:
    215
    Location:
    https://vepay.id
    Maksudnya gmana toh mas?
     
  18. sirdoyle

    sirdoyle Ads.id Fan

    Joined:
    Aug 29, 2010
    Messages:
    130
    Likes Received:
    6
    Sudah saya coba suhu, hasilnya lumayan geometrix dari C langsung B dan agak enteng.
    Thanks infonya suhu..
     
  19. vebry_exa

    vebry_exa Super Hero

    Joined:
    Jul 31, 2012
    Messages:
    3,463
    Likes Received:
    215
    Location:
    https://vepay.id
    Mantap masta!

    Daripada banyak tanya, mending langsung praktek :salaman:
     

Share This Page