We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 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!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide
Deleting cookies (via a web page or button)
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
- 354K Banking & Borrowing
- 254.3K Reduce Debt & Boost Income
- 455.3K Spending & Discounts
- 247K Work, Benefits & Business
- 603.6K Mortgages, Homes & Bills
- 178.3K Life & Family
- 261.1K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.7K Read-Only Boards