Cookies can be used for a number of things such as building up a Shopping
List of things that you'd like to buy from an e-commerce site as you
browse through their pages and a cookie is used to store the scores so
far for the Noughts and Crosses
( Tic-Tac-Toe ) game on this site.
Cookies are stored as a Name=Value pair and have an expiry time set
when they are created. Such cookies can be easily created and retrieved
using simple JavaScript functions. Note that it is not possible to
retrieve any information, other than the Name and Value, of the
cookie that may have been set when the cookie was created ( such as the
name of the site to which it relates or its expiry time ).
The Cookie Editor
The Cookie Editor will allow you to add, change and delete cookies that are
associated with this site. Every cookie that is added will remain in existence
for an hour after it has been created or edited and will still appear in the
list of cookies if this page is closed then returned to in under an hour.
Because this site uses cookies; it is obvious that a necessary cookie could be
edited or deleted either deliberately or accidentally using the Cookie Editor.
To avoid this problem; all cookies that are used by this site are prefixed with
a dollar character ( $ ) and the Cookie Editor will not allow cookies whose
names begin with a dollar character to be added, edited or deleted.
Finding the cookies
The list of cookies used for this site that have not expired is shown when the
page is loaded and can be updated by clicking on the Refresh button;
this will remove any cookies that have expired from the list.
This list is also updated every minute or so, whenever a cookie is added,
changed, deleted, its value is retrieved or a Clean Up is performed.
Adding a cookie
To add a new cookie; enter a name for the cookie in the Cookie Name
text box, the required value in the Cookie Value text box and
select the required expiry time then click the Add Cookie button. It
is not possible to add or change any cookies whose name begins with a dollar
character ( $ ).Adding a cookie with the same name as an existing cookie will change its value
to that required.
Click the Get Cookie Value button to retrieve the current value of the
named cookie. Note that the expiry time of the cookie cannot be retrieved.
Note that any cookies added or changed using the Cookie Editor will expire
according to the expiry time selected from the time when they were added or
changed.
Deleting a cookie
To delete a cookie; enter the name of the cookie to delete in the Cookie
Name text box then click the Delete Cookie button. It is not
possible to delete any cookies whose name begins with a dollar character ( $ ).
Trying to delete a cookie that does not exist will have no effect.
Removing all user created cookies
To remove all cookies that have been created whilst experimenting with the
Cookie Editor ( that is all cookies except those that start with a dollar
character ( $ ) which are used by pages on this site ); click the Clean
Up button.The Clean Up function has not been implemented in yet.
Using the Cookie Editor for your own purposes
All the JavaScript examples given on this site are FreeWare products
which means that, providing you abide by the
FreeWare Licence, you can download this program and
run it from your hard disk or upload it to another site on the internet,
however, it will only be able to edit those cookies that have been created
from the site where the Cookie Editor is loaded.
You are also free to modify this program, but, although the program can be
modified to allow changes to be made to any
cookie that starts with a dollar character; it is strongly advised that no
such modification should be made as this allows you to protect your own
site generated cookies from being damaged by users playing with the Cookie
Editor. It will of course be necessary to ensure that your site only
generates and uses cookies that start with a dollar character.
It will be necessary to modify or remove all the links and references that
occur within this page which relate to other pages on the Happy Hippy's site
as they would be meaningless on another site.
If you wish to use or modify the Cookie Editor for your own purposes you will
need to download the following two files to the same directory ...
- cookies.htm : The
HTML and JavaScript code for the page you are using.
- include.js : A
library of JavaScript utility functions.
Both files will also need to be copied to the same directory if you upload
the Cookie Editor onto your own internet site.