HTML Compression/GZIP

yepuras

Well-Known Member
Registered
Full Member
VIP Club
#1
De cateva zile tot incerc sa-mi urc cat de cat scorul SEO la bloguri si cea mai noua problema o am cu HTML Compression/GZIP .
Mesajul primit de la ei este You should compress your HTML to reduce your page size and page loading times - this will help your site retain visitors and increase page views. If you were using compression, you could be compressing your HTML size by 76 % - from 26.43 Kb to 6.34 Kb which would further reduce your page loading time.
Imi spun si ca rezolvarea este
Your two options for file compression are Deflate and GZIP.
  • Deflate is an option which comes automatically with the Apache server and which is simple to set up.
  • GZIP on the other hand needs to be installed and requires a bit more work to install. However, GZIP does achieve a higher compression rate and therefore might be a better choice if your website uses pages which have a lot of images or large file sizes.
Setting up file compression for your website will depend on which type of server you?re using for your website. Most likely, you?ll be using Apache, which means you can enable compression by adding a few deflate codes to your .htaccess file.

Am instalat pluginul insa nu functioneaza , trebuie ceva setari facute , imi poate explica si mie cineva ce anume si cum trebuie sa fac , multumesc anticipat .
 

Naruto9

Well-Known Member
Registered
Full Member
Web Designer
VIP Club
#2
De cateva zile tot incerc sa-mi urc cat de cat scorul SEO la bloguri si cea mai noua problema o am cu HTML Compression/GZIP .
Mesajul primit de la ei este You should compress your HTML to reduce your page size and page loading times - this will help your site retain visitors and increase page views. If you were using compression, you could be compressing your HTML size by 76 % - from 26.43 Kb to 6.34 Kb which would further reduce your page loading time.
Imi spun si ca rezolvarea este
Your two options for file compression are Deflate and GZIP.

  • Deflate is an option which comes automatically with the Apache server and which is simple to set up.
    GZIP on the other hand needs to be installed and requires a bit more work to install. However, GZIP does achieve a higher compression rate and therefore might be a better choice if your website uses pages which have a lot of images or large file sizes.
Setting up file compression for your website will depend on which type of server you?re using for your website. Most likely, you?ll be using Apache, which means you can enable compression by adding a few deflate codes to your .htaccess file.

Am instalat pluginul insa nu functioneaza , trebuie ceva setari facute , imi poate explica si mie cineva ce anume si cum trebuie sa fac , multumesc anticipat .
adauga asta in htaccess si vezi ce scor vei avea:
Cod:
# BEGIN WP Performance Score Booster Settings

## BEGIN Enable GZIP Compression ##
<IfModule mod_deflate.c>
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 image/svg+xml
SetOutputFilter DEFLATE
</IfModule>
## END Enable GZIP Compression ##


<IfModule mod_expires.c>
  ExpiresActive on

# Perhaps better to whitelist expires rules? Perhaps.
  ExpiresDefault "access plus 1 month"

# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
  ExpiresByType text/cache-manifest "access plus 0 seconds"

# Your document html
  ExpiresByType text/html "access plus 0 seconds"

# Data
  ExpiresByType text/xml "access plus 0 seconds"
  ExpiresByType application/xml "access plus 0 seconds"
  ExpiresByType application/json "access plus 0 seconds"

# Feed
  ExpiresByType application/rss+xml "access plus 1 hour"
  ExpiresByType application/atom+xml "access plus 1 hour"

# Favicon (cannot be renamed)
  ExpiresByType image/x-icon "access plus 1 week"

# Media: images, video, audio
  ExpiresByType image/gif "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType image/jpg "access plus 1 month"
  ExpiresByType image/jpeg "access plus 1 month"
  ExpiresByType video/ogg "access plus 1 month"
  ExpiresByType audio/ogg "access plus 1 month"
  ExpiresByType video/mp4 "access plus 1 month"
  ExpiresByType video/webm "access plus 1 month"

# HTC files (css3pie)
  ExpiresByType text/x-component "access plus 1 month"

# Webfonts
  ExpiresByType application/x-font-ttf "access plus 1 month"
  ExpiresByType font/opentype "access plus 1 month"
  ExpiresByType application/x-font-woff "access plus 1 month"
  ExpiresByType image/svg+xml "access plus 1 month"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 month"

# CSS and JavaScript
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"

  <IfModule mod_headers.c>
    Header append Cache-Control "public"
  </IfModule>
 

AlexH

Merg pe strada catre Mine...
Membru personal
Administrative
Freelancer
SEO Expert
#3
Compresia http se poate face in mai multe feluri. Majoritatea pluginurilor de cache au aceasta optiune.
Adaugi acest code in .htaccess. Vezi sa nu existe deja. Daca rulezi site-ul prin cloudflare, dupa ce adaugi mergi si stergi cache.
Cod:
<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>
Apache mode, in caz ca cel de mai sus nu functioneaza
Cod:
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
Codul pus de @Naruto9 este mai complet si avansat care te ajuta. Asa ca iti recomand sa-l folosesti.
 

yepuras

Well-Known Member
Registered
Full Member
VIP Club
#4
Multumesc mult la amundoi si sincer chiar ma bucur ca exista acest forum unde de esti si afona ca mine tot inveti cate ceva .
 

yepuras

Well-Known Member
Registered
Full Member
VIP Club
#5
Oau ce diferenta :

Congratulations! Your page is successfully compressed using gzip compression on your code.
Your HTML is compressed from 117.70 Kb to 16.86 Kb (86 % size savings). This helps ensure a faster loading web page and improved user experience.
Performance grade A 93
 

AlexH

Merg pe strada catre Mine...
Membru personal
Administrative
Freelancer
SEO Expert
#6

crystygye

Well-Known Member
Registered
Full Member
#7
DACA aveti droplet sau access la root server, cel mai simplu mod si eficient este sa instalati modulul pagespeed de la google, pe server. Va face automat tot ce se poate posibil la orice modificare. Practic nu va mai trebuiesc module, modificari htaccess, etc.
 

AlexH

Merg pe strada catre Mine...
Membru personal
Administrative
Freelancer
SEO Expert
#8
instalati modulul pagespeed de la google, pe server
Ai asa ceva instalat?
Daca da, se vad diferente la site-uri, la scanari/teste iti mai spune ceva?
Spre exemplu cand faci test pe google speed, iti da scor bun?
 

crystygye

Well-Known Member
Registered
Full Member
#9
Da am modulul instalat de mult. Da, arata scorul si calculeaza cum ar trebui cu sau fara modul instalat. Scor desktop 90+ din 100 ( in functie de ce mai folosesc pe langa).
Face tot ce se poate posibil singur = tot ce faceau pluginurile dinainte. Exceptand resursele externe ce nu tin de site meu (logic).

Practic am doar acest modul si un plugin de cache instalat si merge treaba excelent. Iar htaccess este cel care il formeaza wordpress la instalare, nimic mai mult.
Merita deplin daca ai access root. Te scapa de multa munca si resurse folosite inutil. A life saver and a clean website.
 

yepuras

Well-Known Member
Registered
Full Member
VIP Club
#11
crystygye nu prea am sanse sa verific solutia ta , insa ieri am reusit cu ajutorul celor de pe forum sa ridic SEO score la 87 si deja vad ca mi s-a triplat traficul , blogul se incarca foarte bine si rapid , asa ca recomd tuturor .
 

adamas

Active Member
Registered
Full Member
#12
@AlexH , in control panel la optiunea Optimize Website la Compress Content spune ca deflate mode ala e disable, poti sa mi-l activezi? Spune ca pot si eu sa fac asta dar nu stiu exact cum o sa se comporte siteul, nu vreau sa stric ceva.
Compress Content
Apache 2.0 and 2.2 allow you to compress content before sending it to the visitor’s browser. The types of content to be compressed are specified by MIME type. This feature requires Apache’s mod_deflate to function correctly.

Disabled
Compress All Content
Compress the specified MIME types.
MIME Types

Am adaugat codul ala in htacces a lui naruto9 si nu am observat nimic la site sa se schimbe ceva.
 

crystygye

Well-Known Member
Registered
Full Member
#14
@Peter Pony intri pe site oficial de la google pagespeed la modul de instalare. Si ai tutorial de la google cum sa instalezi si sa activezi modulul pe tipul de server care il detii. Pas cu pas.
Il instalezi, activezi si resetezi serverul/dropletul. Atat, restul face el automat.
Nu am ce tutorial sa fac.
 

WPMT

Active Member
Registered
Full Member
#15
@yepuras banuiala mea ca triplarea traficului nu are legatura cu modificarilor pe care le-ai facut.. E prea devreme.

In fine.. altceva vroiam eu sa zic.
Am vazut ca in ultimul timp sunt destui de multi administratori de siteuri care isi bat capul cu chestii deastea micute.
In practica SEO nu inseamna aproape deloc pagespeed. Luati top 500 alexa si vedeti cate siteuri au peste 75..
Noi, in general, daca trec de 85 nu ne mai batem capul cu ele.
 

Peter Pony

Vedeta
Registered
Full Member
#16
@Peter Pony intri pe site oficial de la google pagespeed la modul de instalare. Si ai tutorial de la google cum sa instalezi si sa activezi modulul pe tipul de server care il detii. Pas cu pas.
Il instalezi, activezi si resetezi serverul/dropletul. Atat, restul face el automat.
Nu am ce tutorial sa fac.
Mc. O sa încerc astăzi, poate.
 

yepuras

Well-Known Member
Registered
Full Member
VIP Club
#17
Sincer nu stiu daca are sau nu legatura cu triplarea traficului insa momentan blogul se incarca foarte bine desi am 3 pop pe ele si cel putin 6 bannere de la diferite firme de ads si in continuare traficul este in crestere de cand am facut ceva schimbari esentiale , ajutat atat de voi cat si de Alex , multumesc pentru asta .
Intr-un final la acest scor am ajuns ( sory ptr link nu am pus imagine deoarece este adult ) .

Scor Seo
 

adamas

Active Member
Registered
Full Member
#18
iepurila, prin perioada in care ai zis de acel html compression, si pe mine m-a ajutat alex sa setez acele coduri in htacces, si ieri si azi am observat o crestere la siteurile mele, nu stiu daca e de la acele setari sau nu, dar am inteles de la un alt user de pe acest forum ca urmeaza iar un update cam pe 20 aprilie cica.
sa vedem ce ne rezerva zilele astea.
 

bmxro

Moderator
Moderator
Registered
Full Member
VIP Club
#19
eu am activat compresia din cpanel la website optimize, cred ca nu mai trebuie să fac alte modificări în .htacces?
 

bmxro

Moderator
Moderator
Registered
Full Member
VIP Club
#20
Și pentru leverage browsing caching e bun codul ce il dau ei în htacces?
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING ##
 

Reclama

Loading...

Reclama Ta Aici

Stiri Monezi Virtuale

Reducere pentru Vacanta

Loading...
Sus