in

Uso della Cache e miglioramento SEO nella SERP

Torno ancora sulla velocità di caricamento della pagina. L’obiettivo è sempre il miglioramento del posizionamento nella SERP di Google. Questa tipica attività SEO può ottenere un significativo miglioramento istruendo il client dell’utente affinché non richieda ogni volta tutti i dati della pagina, ma lo faccia in modo intelligente.
In funzione della tipologia di file, infatti (html, css, javascript, immagini, etc..) è possibile specificare un tempo di permanenza nella cache locale. All’interno di questa finestra temporale, il client dell’utente non richiederà nuovamente l’informazione al nostro server, utilizzando quella richiesta in precedenza e conservata nella memoria locale.
Per attivare questa magia con Apache, è sufficiente utilizzare il file .htaccess e specificare, per ciascuna tipologia di file, il tempo di vita desiderato.

Riporto qui sotto un esempio di configurazione che mi ha consentito di portare il rankig di Google PageSpeed Insights da 74/100 all’attuale 81/100, cosa di cui vado piuttosto fiero!<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css “access plus 2 months”
ExpiresByType application/x-javascript “access plus 2 months”
ExpiresByType text/html “access plus 2 months”
ExpiresByType text/richtext “access plus 2 months”
ExpiresByType image/svg+xml “access plus 2 months”
ExpiresByType text/plain “access plus 2 months”
ExpiresByType text/xsd “access plus 2 months”
ExpiresByType text/xsl “access plus 2 months”
ExpiresByType text/xml “access plus 2 months”
ExpiresByType video/asf “access plus 2 months”
ExpiresByType video/avi “access plus 2 months”
ExpiresByType image/bmp “access plus 2 months”
ExpiresByType application/java “access plus 2 months”
ExpiresByType video/divx “access plus 2 months”
ExpiresByType application/msword “access plus 2 months”
ExpiresByType application/x-msdownload “access plus 2 months”
ExpiresByType image/gif “access plus 2 months”
ExpiresByType application/x-gzip “access plus 2 months”
ExpiresByType image/x-icon “access plus 2 months”
ExpiresByType application/vnd.ms-access “access plus 2 months”
ExpiresByType audio/midi “access plus 2 months”
ExpiresByType video/quicktime “access plus 2 months”
ExpiresByType audio/mpeg “access plus 2 months”
ExpiresByType video/mp4 “access plus 2 months”
ExpiresByType video/mpeg “access plus 2 months”
ExpiresByType application/vnd.ms-project “access plus 2 months”
ExpiresByType application/vnd.oasis.opendocument.database “access plus 2 months”
ExpiresByType application/vnd.oasis.opendocument.chart “access plus 2 months”
ExpiresByType application/vnd.oasis.opendocument.formula “access plus 2 months”
ExpiresByType application/vnd.oasis.opendocument.graphics “access plus 2 months”
ExpiresByType application/vnd.oasis.opendocument.presentation “access plus 2 months”
ExpiresByType application/vnd.oasis.opendocument.spreadsheet “access plus 2 months”
ExpiresByType application/vnd.oasis.opendocument.text “access plus 2 months”
ExpiresByType audio/ogg “access plus 2 months”
ExpiresByType application/pdf “access plus 2 months”
ExpiresByType image/png “access plus 2 months”
ExpiresByType application/vnd.ms-powerpoint “access plus 2 months”
ExpiresByType audio/x-realaudio “access plus 2 months”
ExpiresByType application/x-shockwave-flash “access plus 2 months”
ExpiresByType application/x-tar “access plus 2 months”
ExpiresByType image/tiff “access plus 2 months”
ExpiresByType audio/wav “access plus 2 months”
ExpiresByType audio/wma “access plus 2 months”
ExpiresByType application/vnd.ms-write “access plus 2 months”
ExpiresByType application/vnd.ms-excel “access plus 2 months”
ExpiresByType application/zip “access plus 2 months”
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType text/css “access plus 10 years”
ExpiresByType text/js “access plus 10 years”
ExpiresByType text/javascript “access plus 10 years”
ExpiresByType application/javascript “access plus 10 years”
ExpiresByType application/x-javascript “access plus 10 years”
#
FileETag MTime Size
#
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
#
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
</IfModule> 

Cosa ne pensi?

Scritto da Emanuele Donati

I'm a charismatic leader, highly experienced and able to ensure success of the most challenging and ambitious projects. My deep competence in ICT's activities and years of experience in marketing, communication and production, together with business administration wide understanding allow me to operate and succeed in all layers of the company's strategic goals.

I'm continuously searching for original and challenging growing paths to verify and increase my managerial skills. Ranging from defence to telecommunications, entertainment to pharmaceuticals industry, I’ve been able to enrich my managerial background with both start-up and business expansion activities.

Strengths: Creativity, problem solving and design skills, high-technological background, strong managerial capabilities in difficult situations, group development, company mission and vision evangelist, deep comprehension of corporate governance

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Compressione GZIP e miglioramento nella SERP

Erogazione dinamica di contenuti grazie ad Apache