Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Delete All Cookies Called:
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 28 September 2005 :  04:25:14  Show Profile
How do I make a link that deletes all cookies called "smumcookies". Is there an easy way to do this?

Thanks

dabugster
Junior Member

USA
168 Posts

Posted - 28 September 2005 :  04:38:12  Show Profile  Visit dabugster's Homepage  Send dabugster an AOL message  Send dabugster a Yahoo! Message
On one of the MANY different phases my board has gone though, i had this code put in the users profile

Response.Write"                    <tr>" & vbNewLine & _																			
              "                      <td class=category2 align=""center"" colspan=""2"">You may delete all cookies set by these forums by selecting the ""logout"" button at the top of any page.</font>" & vbNewLine 
Response.Write"                      <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>Or alternatively by clicking this link: <a href=""javascript:openWindow('pop_delete_cookie.asp?')""" & dWStatus("Delete Cookies set by this Forum") & " tabindex=""-1""><acronym title=""Delete Cookies set by this Forum""><b>Delete Forum Cookies</b></acronym></a></font></td>" & vbNewline & _	
              "                      </tr>" & vbNewLine		                                "                      </tr>" & vbNewLine


And the code for the page pop_delete_cookie.asp is

<%@ Language=VBScript %>
<%option Explicit
Response.Buffer=True
Dim objCookie
Response.Write "<p><font face=""arial"" size=""3"">Deleting cookies...</font><BR><BR>"
For Each objCookie In Request.Cookies
Response.Cookies(objCookie).Expires = "September 1, 1999"
Next
Response.Write "<p><font face=""arial"" size=""3"">Done.</font>" & vbNewLine & _
" <script language=""javascript1.2"">self.opener.location.reload();</script>" & vbNewLine
Response.Write "<body onLoad=""setTimeout(window.close, 2000)"">" & vbNewLine
%>



It worked for me when i had it on my board, i just don't have it there anymore for one reason or another.

I forget who originally whote the code.

Hope this helps
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 28 September 2005 :  08:07:07  Show Profile  Send pdrg a Yahoo! Message
btw - you can only delete cookies from your own domain unless you use javascript and make the client run it (with elevated privs)

There's been a lot of XSS fixes preventing exploits of this kinda functionality
Go to Top of Page

dabugster
Junior Member

USA
168 Posts

Posted - 28 September 2005 :  12:32:22  Show Profile  Visit dabugster's Homepage  Send dabugster an AOL message  Send dabugster a Yahoo! Message
LOL

Thats probably why it isn't on my board anymore ... became oblolete.
I just remember i had it on one of my forums and searched through my files till i found it.

Well at least it will give you a base to work from to maybe be able to adapt it to suit your needs.
Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 28 September 2005 :  15:17:24  Show Profile
Thanks, I´ll try it
Go to Top of Page

taropatch
Average Member

USA
741 Posts

Posted - 31 October 2007 :  23:27:29  Show Profile
Does this not work anymore due to security fixes? I tried it on my forum but it doesn't seem to work.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07