We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Deleting cookies (via a web page or button)
Options

esuhl
Posts: 9,409 Forumite


in Techie Stuff
I've been asked to design a web page with the capability of deleting several specific cookies. The cookies would be from the same domain as the page which is deleting them (i.e. I want to delete my own cookies from a user's PC!)
The users wil almost always be using Internet Explorer v5.5 or above, and have Javascript enabled. Many will be accessing my web page from their work (and so have all manner of corporate restictions on their PC).
I really don't know where to begin as I know nothing about web design except very basic HTML. Does anyone know the most effective method of doing this? Should I use ASP or PHP or Javascript (or something else) to ensure that this works most (if not all) of the time...?
Many thanks in advance!
The users wil almost always be using Internet Explorer v5.5 or above, and have Javascript enabled. Many will be accessing my web page from their work (and so have all manner of corporate restictions on their PC).
I really don't know where to begin as I know nothing about web design except very basic HTML. Does anyone know the most effective method of doing this? Should I use ASP or PHP or Javascript (or something else) to ensure that this works most (if not all) of the time...?
Many thanks in advance!
0
Comments
-
You can delete a cookie by setting its expiry time to a time in the past. See http://www.elated.com/tutorials/programming/javascript/cookies/ for a Javascript function to do that and other useful cookie functions.
If you want the users to control which cookies they delete and when, you could use a HTML form and call the delete function from the onClick attribute of the <INPUT> tag with type="button", e.g. see http://www.pageresource.com/jscript/jbutton.htm. Otherwise call it in the onLoad event of the <BODY> tag.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 350.9K Banking & Borrowing
- 253.1K Reduce Debt & Boost Income
- 453.5K Spending & Discounts
- 243.9K Work, Benefits & Business
- 598.7K Mortgages, Homes & Bills
- 176.9K Life & Family
- 257.1K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards