cant control cache

Problems with the Windows version of XAMPP, questions, comments, and anything related.

cant control cache

Postby anyandallart » 23. November 2015 06:27

I've tried to change the cache settings in httpd.conf, and in htaccess, and for some reason my localhost is still serving cached version of my html pages.

Can anyone please help?

These are my httpd.conf settings:

<filesMatch "\.(html|htm|js|css)$">
FileETag None
<ifModule mod_headers.c>
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"
</ifModule>
</filesMatch>
CacheDisable /local_files

These are my htaccess settings:

<FilesMatch "\.(html|htm|php|cgi|pl|asp|aspx|js|css)$">
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
</FilesMatch>
anyandallart
 
Posts: 2
Joined: 23. November 2015 06:18
Operating System: WINDOWS

Re: cant control cache

Postby Altrea » 23. November 2015 06:58

Browser cache settings?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: cant control cache

Postby anyandallart » 23. November 2015 07:30

Okay so this is the only thing that worked for me.

I needed to add this line to my httpd-vhosts.conf

AllowOverride all

It allowed what I have in htaccess to override the server defaults. I think it could also work putting it somewhere in httpd.conf, however it only seems to work if i specify it for that specific directory or for all directories in general

This is a snippet of part of the new httpd-vhosts.conf that works with AllowOverride all:

<VirtualHost *>
DocumentRoot "D:\myDirectory"
ServerName mydirectory
<Directory "D:\myDirectory">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
anyandallart
 
Posts: 2
Joined: 23. November 2015 06:18
Operating System: WINDOWS


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 128 guests