stop browser from cacheing page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
goblinhybrid
Forum Newbie
Posts: 8
Joined: Tue Dec 09, 2003 2:41 pm

stop browser from cacheing page

Post by goblinhybrid »

hi,
im using basic authentication to protect a .php file containing my passwords. ive seen lots of stuff about this subject and im using

Code: Select all

header("Cache-Control: no-store, no-cache, must-revalidate"); 
header("Cache-Control: post-check=0, pre-check=0", false);
to reload the page. this worked with a simple php page however when i tried it with basic authentication the login box didn't appear. is there anyway to fix this so everything is reloaded?
thanks
goblinhybrid
Forum Newbie
Posts: 8
Joined: Tue Dec 09, 2003 2:41 pm

Post by goblinhybrid »

someone must know...
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

using basic auth there is no way to `logout` person without closing the browser. Take a look: http://httpd.apache.org/docs/howto/auth.html#basicfaq
Post Reply