473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to declare a cookie that will destroy after browser is closed

Hi all,

I want to use a cookie that will destroy after closing the
browser, in my application.
I am able to destroy my cookie after log out,but don't know how to
destroy this when I will close the browser.
Please help me.

Amar

Jan 31 '07 #1
3 6761
Amar wrote:
Hi all,

I want to use a cookie that will destroy after closing the
browser, in my application.
I am able to destroy my cookie after log out,but don't know how to
destroy this when I will close the browser.
Please help me.

Amar
Hi Amar,

Change in php.ini, or use ini_set().
Look for:

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0
Regards,
Erwin Moller
Jan 31 '07 #2
Hi Amar,
>
Change in php.ini, or use ini_set().
Look for:

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

Regards,
Erwin Moller
Isn't this called a session cookie (vs. a regular cookie)?

SV.

/just curious

Jan 31 '07 #3
On Wed, 31 Jan 2007 11:36:03 -0800, <sa********@gmail.comwrote:
>Hi Amar,

Change in php.ini, or use ini_set().
Look for:

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

Regards,
Erwin Moller

Isn't this called a session cookie (vs. a regular cookie)?

SV.

/just curious
Session cookies are indeed set with a lifetime of 0, but setting a cookie
with that lifetime doesn't necessarily need to be used for session
management.

--
Curtis, http://dyersweb.com
Feb 1 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: chrism | last post by:
Hello, I have a pop-up window that I would like to appear in front of the browser home page when a user opens IE. Problem is, I'd like it to never appear again if the user navigates back to the...
4
by: yingjian.ma1955 | last post by:
Hi All, According to a book, the cookie without expires lasts the browser session. I think a browser session ends if you close all the browser windows. I setup a cookie without expires in IE6...
2
by: venkat | last post by:
hi If you close the browser directly then the cookie won't get deleted. When ever you log off only it will get deleted. If you close the browser directly and again the open the browser for the...
2
by: George Durzi | last post by:
When you call FormsAuthentication.SignOut(), is the FormsAuthentication cookie supposed to be destroyed automatically? I'm creating my FormsAuthentication cookie by doing: HttpCookie oCookie =...
4
by: Big E | last post by:
I set a cookie at a login screen that sets various information. When users are finished with the application most of them close the browser instead of clicking logoff. How do I clear or remove...
15
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok....
23
by: Phil Powell | last post by:
// OBTAINED FROM http://www.javascripter.net/faq/settinga.htm // NOTE THAT IF YOU SET days TO -1 THE COOKIE WILL BE SET TO YESTERDAY AND THUS EXPIRE function setCookie(name, value, days, docObj)...
0
by: joseph conrad | last post by:
Hi, I tried to implement my own session handler in order to keep control on the process the drawback I foun it is not creating and storing in my cookie the PHPSESSID variable anymore. reading te...
3
by: webster5u | last post by:
Miss/Mr. Programmer, I have a idea to remove the cookie value from a website after all browser closed. It is like session kept in server and eliminate after all browser closed. My purpose is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.