
İçindekiler
Bir kullanıcı bir web sitesini ziyaret ettiğinde, tarayıcı otomatik olarak dosyaları yükler ve bunları belleğe kaydeder. Dolayısıyla kullanıcı aynı web sitesinin, diğer web sayfalarını kontrol etmeye karar verdiğinde, tüm dosyaları yeniden yüklemesine gerek yoktur. Add Expires Headers, bu dosyaları indirip saklamak için tarayıcınıza komut verir. Bunun nedeni bilgisayarınız ile sunucu (web sitesi) arasındaki gönderme ve alma işlemlerini azaltmak ve önbelleğinizde depolanan verileri kullanmaktır.
Add Expires Headers Neden Önemlidir
Add Expires Headers’ın eklenmesi, sunucunun tarayıcıyla iletişim kurma süresini azaltan HTTP isteklerini azaltmak için önemlidir. Ayrıca kullanıcıların indirmeleri gereken dosya miktarını azaltmak için tarayıcıda saklanan önbellek dosyalarını tekrar kullanmalarına izin verir.
Add Expires Headers Nasıl Yapılır
Add Expires Headers web sitenize eklemek için .htaccess dosyalarına bu kodları yapıştırarak ekleyebilirsiniz.
<IfModule mod_expires.c>
ExpiresActive On ExpiresDefault "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" 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 text/css "access 1 month" ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType text/xml "access plus 0 seconds" ExpiresByType application/javascript "access plus 1 year" ExpiresByType text/x-component "access plus 1 month" ExpiresByType text/html "access plus 0 seconds" ExpiresByType application/x-web-app-manifest+json "access plus 0 ExpiresByType text/cache-manifest "access plus 0 seconds" ExpiresByType audio/ogg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType video/mp4 "access plus 1 month" ExpiresByType video/ogg "access plus 1 month" ExpiresByType video/webm "access plus 1 month" ExpiresByType application/atom+xml "access plus 1 hour" ExpiresByType application/rss+xml "access plus 1 hour" ExpiresByType application/font-woff "access plus 1 month" ExpiresByType application/vnd.ms-fontobject "access plus 1 month" ExpiresByType application/x-font-ttf "access plus 1 month" ExpiresByType font/opentype "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month"</IfModule>