Hemanshu Bhojak
Hemanshu Bhojak

Reputation: 17288

Cookie Behavior

If cookies are disabled in a browser, can we create a non persistent cookie which will get destroyed when the browser is closed?

Upvotes: 0

Views: 1126

Answers (3)

Ravi shankar
Ravi shankar

Reputation: 2460

go through below links, will clarify your doubts.

1) Session Cookies.

2) Persistent Cookies.

3) Managing Cookies.

4) Creating Session Cookies.

Upvotes: 4

loxxy
loxxy

Reputation: 13151

Persistent cookies are permanent cookies.They are stored as a text file in the hard disk of the computer.

Non-persistent cookies are stored in browser processor in temporarily. Its also called in memory cookies. Non-Persistent cookies are otherwise called as temporary cookies.They are active as long as the browser remains active.They are also called as session based cookies.Once the browser is closed the cookies vanishes automatically.


Non-persistent cookies are cookies in any way. So if cookies are disabled, it includes disabling all types of cookies i.e locking the browser out of writing any data to the main memory or the file system.

However if you wish to store session information you can use cookie less sessions, which obviously use the alternative of adding a session key to the address.

Upvotes: 0

Core Xii
Core Xii

Reputation: 6441

No. What the browsers do with your cookie is up to them. You can only offer them one, not dictate what they do with it.

My browser is set up to ask me if I want to accept cookies, and if I want to I can override their expiration to browser exit.

Upvotes: 0

Related Questions