Re: Unable to conditionally set cache-control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is the home.html an actual file or a Rewrite rule ?
Do you have the same problem with other files ? .js or .css ?

On Mon, Jun 7, 2010 at 9:05 PM, <mitchel.carlsen@xxxxxxxxxx> wrote:

Please excuse my query as I’m new to apache and open source in general.  I’m attempting to set the cache-control to no-cache by using the following statements within my httpd.conf:

 

<FilesMatch "\.(html|htm|js|css)$">

Header unset ETag

Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"

Header set Pragma "no-cache"

Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"

</FilesMatch>

 

When I use the configuration above, I get the following unexpected response (home.html page):

 

HTTP/1.1 200 OK

Date: Mon, 07 Jun 2010 23:35:14 GMT

Server: Apache/2.2.3 (Red Hat)

Connection: close

Transfer-Encoding: chunked

Content-Type: text/html; charset=UTF-8

 

If I remove the ‘FilesMatch’ conditional statement and use the following::

 

Header unset ETag

Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"

Header set Pragma "no-cache"

Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"

 

I then get the expected results on the response (home.html page):

 

HTTP/1.1 200 OK

Date: Mon, 07 Jun 2010 23:43:04 GMT

Server: Apache/2.2.3 (Red Hat)

Cache-Control: max-age=0, no-cache, no-store, must-revalidate

Pragma: no-cache

Expires: Wed, 11 Jan 1984 05:00:00 GMT

Connection: close

Transfer-Encoding: chunked

Content-Type: text/html; charset=UTF-8

 

I have not been able to get the conditional ‘FilesMatch’ statement to work.  Any ideas what I may be doing wrong or may be missing?  Thanks in advance for your help.

 

MJC

 

 




_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Notice: This information is intended only for the person(s) or entity(ies) to which it is addressed. This information may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux