http - Cache-control max-age setting using .htaccess -
this http.confg file:
mutex file:${apache_lock_dir} default pidfile ${apache_pid_file} timeout 300 keepalive on maxkeepaliverequests 100 keepalivetimeout 5 user ${apache_run_user} group ${apache_run_group} hostnamelookups off errorlog ${apache_log_dir}/error.log loglevel warn includeoptional mods-enabled/*.load includeoptional mods-enabled/*.conf include ports.conf <directory /> options followsymlinks allowoverride none require denied </directory> <directory /usr/share> allowoverride none require granted </directory> <directory /var/www/> options indexes followsymlinks allowoverride require granted </directory> accessfilename .htaccess <filesmatch "^\.ht"> require denied </filesmatch> logformat "%v:%p %h %l %u %t \"%r\" %>s %o \"%{referer}i\" \"%{user-agent}i\"" vhost_combined logformat "%h %l %u %t \"%r\" %>s %o \"%{referer}i\" \"%{user-agent}i\"" combined logformat "%h %l %u %t \"%r\" %>s %o" common logformat "%{referer}i -> %u" referer logformat "%{user-agent}i" agent includeoptional conf-enabled/*.conf includeoptional sites-enabled/*.conf include /etc/phpmyadmin/apache.conf
this .htaccess file:
<filesmatch "\.(xml)$"> header unset etag fileetag none header set cache-control "max-age= 300, public" </filesmatch>
this link i'm experimenting on : ` http://ec2-54-226-158-192.compute-1.amazonaws.com/livetv.xml
(1) when first direct link on mozilla firefox,
and gather on client side, using wire-shark.
(2) send request again:
and gather on client side, using wire-shark.
(3) when max-age expires, send request again:
and gather on client side, using wire-shark.
my questions on here :
why getting
cache-control: max-age=0
on server side ?shouldn't 200 response after max-age expires? why getting 304 status code on first request after max-age expires?
Comments
Post a Comment