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.


Second, to edit a certain value use:


For example, if the following field exist:


The value can be changed to yes with the following code:


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
Download latest release from:

6 Responses to “Javascript Injection (Cookie Editing)”

Leave a Reply


Haider’s WebSpace

Welcome to my technical blog. This is where I write, archive and share computer related articles. Subjects vary from posting technical solutions to researching particular topics. Feel free to comment and talk IT!

The information provided is for educational purposes only. All content including links and comments is provided "as is" with no warranty, expressed or implied. Use is at your own risk and you are solely responsible for what you do with it.

Sponsored Links
My Tweets