Your browser’s address bar (URL bar) can be used to inject JavaScript code directly into the webpage you are visiting without reloading the page. The following codes are useful to do cookie editing but remember, this demonstration is for education purpose, you should not attempt to perform such test on data you do not personally own and control:
First, visit the targeted webpage and inject the following code to view realted cookie’s fields and the values assigned to them.
javascript:alert(document.cookie); |
Second, to edit a certain value use:
javascript:void(document.cookie="Field=myValue"); |
For example, if the following field exist:
active=no
The value can be changed to yes with the following code:
javascript:void(document.cookie="active=yes"); |
If the field’s name does not exist, it will be created.
To have more control over cookies, refer to a proper tutorial and inject the codes in a similar way.
In addition, there are cookies editors available online such as the following PlugIn for Mozilla FireFox:
Add N Edit Cookies
Homepage: http://addneditcookies.mozdev.org.
Download latest release from: https://addons.mozilla.org/en-US/firefox/addon/573.

I’ve known about this trick for about four years now, and I’ve actually hacked forum accounts with it before. Pretty lame that it actually works if you ask me.
THNX =D
Hey Guys,
A Cookie is nothing but a small text file that’s stored in your browser. It contains some data such as………..
for more details please check out the following link…….
http://mindstick.com/Articles/0d398a71-36a1-4dc3-9c5a-ce0ad6884778/?Manipulation%20Cookies%20in%20Java%20Script
Thanks !!!!
What do you do when the javascript doesn´t return any data??
When I use this injection, I dont get anything back from the webpages. Do I need to sign in to use it, or am I doing something wrong. I copy the lines to javascript into the URL bar of the page and made sure to change “MyValue” to a cookie name, but got nothing back.