clearing cookies on browser close
-
Hi All, I have one doubt, how to clear the cookies on browser closing in asp.net
-
Hi All, I have one doubt, how to clear the cookies on browser closing in asp.net
There is no way to trap Browser close event of the client as per I know. You can clear cookie during sign off. :rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
There is no way to trap Browser close event of the client as per I know. You can clear cookie during sign off. :rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
Thank you for your suggestion but i already did that.I have to do the same in browser close also.
-
There is no way to trap Browser close event of the client as per I know. You can clear cookie during sign off. :rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
Abhishek Sur wrote:
There is no way to trap Browser close event of the client as per I know.
AFAIK, there is. :)
Abhishek Sur wrote:
You can clear cookie during sign off
Which sign off? :doh:
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
Hi All, I have one doubt, how to clear the cookies on browser closing in asp.net
amarnath n.n wrote:
how to clear the cookies on browser closing in asp.net
If you don't set an expiry date, the cookie will be a 'session cookie' so will be deleted when the browser session ends.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
Hi All, I have one doubt, how to clear the cookies on browser closing in asp.net
On
onbeforeunload
event of body loop all cookies and set expire date.That will do the trick.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
Abhishek Sur wrote:
There is no way to trap Browser close event of the client as per I know.
AFAIK, there is. :)
Abhishek Sur wrote:
You can clear cookie during sign off
Which sign off? :doh:
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
Manas Bhardwaj wrote:
Abhishek Sur wrote: There is no way to trap Browser close event of the client as per I know. AFAIK, there is. Smile
Manas, you are correct, I have done this think a quite time before :)
function CheckBrowserClose()
{
, Alt+F4 , File -> Close
if(window.event.clientX < 0 && window.event.clientY <0)
{}
}And called it on Body
unload
;)Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
On
onbeforeunload
event of body loop all cookies and set expire date.That will do the trick.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
Blue_Boy wrote:
set expire date
:thumbsup: This is all about the Trick. Set the Cookies expire date, and just relaxed. :laugh:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
amarnath n.n wrote:
how to clear the cookies on browser closing in asp.net
If you don't set an expiry date, the cookie will be a 'session cookie' so will be deleted when the browser session ends.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
Good Answer. And I think, rather than waiting to browser do it set expire date is better option ;)
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
There is no way to trap Browser close event of the client as per I know. You can clear cookie during sign off. :rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
Abhishek Sur wrote:
There is no way to trap Browser close event of the client as per I know.
We can ;). Check my reply to Manas's post !! :)
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
Abhishek Sur wrote:
There is no way to trap Browser close event of the client as per I know.
We can ;). Check my reply to Manas's post !! :)
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
Oh.. got it bro.. Thanks for correcting me. :rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Abhishek Sur wrote:
There is no way to trap Browser close event of the client as per I know.
AFAIK, there is. :)
Abhishek Sur wrote:
You can clear cookie during sign off
Which sign off? :doh:
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
Hey manas.. Thanks for correcting me. :thumbsup:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.