Html Siteler de Cache Nasıl Olur?
3
●123
- 28-01-2020, 10:43:18htaccess ile mümkün,
<ifModule mod_headers.c><filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|ttf|otf|woff|woff2|eot|svg)$">Header set Cache-Control "max-age=2592000, public"</filesMatch><filesMatch "\.(css)$">Header set Cache-Control "max-age=604800, public"</filesMatch><filesMatch "\.(js)$">Header set Cache-Control "max-age=216000, private"</filesMatch><filesMatch "\.(xml|txt)$">Header set Cache-Control "max-age=216000, public, must-revalidate"</filesMatch><filesMatch "\.(html|htm|php)$">Header set Cache-Control "max-age=1, private, must-revalidate"</filesMatch></ifModule>
- 28-01-2020, 14:05:07Bilgi için çok teşekkür ederim hocam. Bizim amacımız daha çok siteye yüklenen resim boyutlarının, görseli bozulmadan düzenlenmesi. Düzenlendikten sonra sanırım site açılış hızına atkı sağlayacaktır. Resimleri boyutlarını bozmadan yaparsak, başarmış olacağız bu işi.Webmerkezi adlı üyeden alıntı: mesajı görüntüle
- 28-01-2020, 14:45:17Ozaman htaccess ile gzipy6lm0z adlı üyeden alıntı: mesajı görüntüle
<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>