Back в браузере

maks

Новичок
Back в браузере

после нажатия кнопки Back в браузере грузиться кеш как в FF так и в IE. Скрипт посылает следующие хедеры для HTTP/1.1

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);

Для // HTTP/1.0

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Pragma: no-cache");

Но это не помогает. Плз подкажите
 

maks

Новичок
грузится предыдущая страница
К примеру юзер
1 залогинелся
2 увидел секьюрную страницу
3 разлогинелся
4 нажал Back и увидел секьерную страницу (должен видеть страницу логина)
 

maks

Новичок
для HTTP/1.1

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);
 

Фанат

oncle terrible
Команда форума
это что?
скажи, ты понял мой вопрос?
ты видел когда-нибудь HTTP заголовок?
 

maks

Новичок
1) это то какие хедеры отсылаются
2) я понял твой вопрос
3) я видел HTTP заголовок

(Status-Line):HTTP/1.1 200 OK
Date:Wed, 05 Apr 2006 18:18:55 GMT
Server:Apache/2.0.54 (Win32) PHP/5.1.1
X-Powered-By:pHP/5.1.1
Set-Cookie:SID=181b6ea893d721dde96ab6f4c02268cf; path=/
Expires:Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified:Wed, 05 Apr 2006 18:18:55 GMT
Cache-Control:max-age=0
Pragma:no-cache
Keep-Alive:timeout=15, max=99
Connection:Keep-Alive
Transfer-Encoding:chunked
Content-Type:text/html;

Вот что получает браузер
 
RTFM RFC 2616 HTTP/1.1:
3.13 History Lists

User agents often have history mechanisms, such as "Back" buttons and
history lists, which can be used to redisplay an entity retrieved
earlier in a session.

History mechanisms and caches are different. In particular history
mechanisms SHOULD NOT try to show a semantically transparent view of
the current state of a resource. Rather, a history mechanism is meant
to show exactly what the user saw at the time when the resource was
retrieved.

By default, an expiration time does not apply to history mechanisms.
If the entity is still in storage, a history mechanism SHOULD display
it even if the entity has expired, unless the user has specifically
configured the agent to refresh expired history documents.

This is not to be construed to prohibit the history mechanism from
telling the user that a view might be stale.
 

maks

Новичок
большое спасибо

-~{}~ 06.04.06 12:15:

да кстате проблема была в том что в самом конце посылался
header("Cache-Control: max-age=0");
он то все и затирал
что и приводило к
Cache-Control:max-age=0

Сейчас все работает
спасиба всем
 
Сверху