An Entrepreneur, Coach, IT Consultant, Strategic Adviser, and a Traveler craving to explore and contribute to forming a better society.

Tuesday, November 25, 2008

Cookies and Persistent Cookies

No comments :
Keywords: Cookies, PHP, Persistent Cookies, Session Cookies

Session Cookies:

Session Cookies are normal storage variables stored in the browser information. It will last until the browser closed or the website discarded.

Persistent Cookies:

Persistent cookies are special cookies which will persist in the browser's information until it is deleted manually/intentionally(via expiration parameter). It will be active until its expiration time(usuall in seconds).

Ex: setcookie( "foo", "bar", 3600);

^ The above statement will instruct the browser to keep "foo" cookie for an hour of time and delete it after then. Persistent cookies will also help us in storing default language the user prefers(can be stored permanently too) to read. This will help us reproducing the same language text when the user comes to visit next time.

Look at the presentation:

Keywords: Cookies, PHP, Persistent Cookies, Session Cookies

I request you all to please Click Here to help the poor people.



No comments :