Forums

PHP

This topic is locked

what does session_cache_limiter do?

Posted 14 Sep 2006 09:04:38
1
has voted
14 Sep 2006 09:04:38 ASif Iqbal posted:
I m new user for this forum, I am very impress by the way people get responses to their queries.
so, Please help me too.
I really don't know anything about that cache term.(even i had searched in google too, but i didn't help me the way I want).
is there any one who can help me to let me understand full use of "session_cache_limiter", with examples
. I would really be thank full to him. please friends.

server-model :- PHP.

Edited by - asif133 on 14 Sep 2006 09:12:28

Edited by - asif133 on 14 Sep 2006 09:15:43

Replies

Replied 14 Sep 2006 11:36:02
14 Sep 2006 11:36:02 Roddy Dairion replied:
follow this link and you'll have a nice explanation on what it does and how to use it.
www.phpbuilder.com/manual/en/function.session-cache-limiter.php
Replied 14 Sep 2006 11:57:57
14 Sep 2006 11:57:57 ASif Iqbal replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
follow this link and you'll have a nice explanation on what it does and how to use it.
www.phpbuilder.com/manual/en/function.session-cache-limiter.php
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

first of all very very thanks to YOU, that how quick you are, You really replied me so fast.

You Know i have already seen all this kind of articles. perhaps i didn't ask my question properly.
that is ok that "it Get and/or set the current cache limiter". it is simple enough to understand.

but sir my problem is that i m confused with HTTP cache control, what exactly it do where it can be used, etc.
please take interest on my question. i m waiting for your reply.... thank you.


Edited by - asif133 on 14 Sep 2006 11:59:49
Replied 14 Sep 2006 13:48:38
14 Sep 2006 13:48:38 Roddy Dairion replied:
There's 2 kind of caches Browser and Proxy. Browser caches basically means that instead of loading the whole page again it use a little section of your hard disk to store the representation i.e images, etc... For example when you hit the back button on a page it doesn't load the page from the server but instead it loads from what is present from the one stored on your hard disk. If you use the same image throughout the site it will accessed from the browser instantly instead of the server thus making the page loading faster. Do a test by clearing your cache in the browser, the load a page that has images for e.g yahoo.com you will see that it take some time to load, then refresh the page (f5) you will find out that it loads faster this means that these images is being retrieved from the browser, cache memory, if it doesn't then it means that your cache isn't enabled. Then you have Proxy Caches which working on the same principles but is a shared cached you might have come across in a browser connection settings, when you can specify if you want to use a proxy server to connect to the net, if you set that then all your requested are routed to then somehow.

HTTP headers is represented like this:
HTTP/1.1 200 OK =&gt;
Date =&gt; Thu, 14 Sep 2006 10:33:24 GMT
Server =&gt; Apache-AdvancedExtranetServer/1.3.26 (Mandrake Linux/6mdk) PHP/4.2.3
X-Powered-By =&gt; PHP/4.2.3
Set-Cookie =&gt; POSTNUKESID=4c5d9d926a9387426a661f6c65f87c0b; expires=Thu, 21-Sep-06 10:33:24 GMT; path=/
Expires =&gt; Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control =&gt; cache
Pragma =&gt; no-cache
Connection =&gt; close
Content-Type =&gt; text/html; charset=iso-8859-15

You don't see the HTTP header in the browser, HTTP header contains information that browser use, such as content type, protocol version used, time document was modified etc. So basically the reads the HTTP header that comes back from the server and behave according to what you tell it to do.

So using session_cache_limiter() specify what should be sent from the server to the browser or proxy for e.g using "nocache" will prevent the browser and proxy to cache the page. using "permit" will allow both browser and proxy to cache the page and "private" will only allow your browser to cache the page.

I hope i explained it properly.

Edited by - roders22 on 14 Sep 2006 13:49:56
Replied 14 Sep 2006 14:05:17
14 Sep 2006 14:05:17 ASif Iqbal replied:

THANK YOU MR. RODDY
THANK YOU AGAIN.

I was very confused with this stuff before, and no one help me lot that much you people helped me.
you are doing just excelent job. now i feel relax.

Nothing can be better than Spreading Knowladge. YOU people are just GREAT.
THANKS.

Edited by - asif133 on 14 Sep 2006 14:06:58

Reply to this topic