Cookies are small files that store information about your browsing activity, such as your login credentials, preferences, and site settings. While cookies are useful for enhancing the browsing experience, they can also impact your privacy and website performance. Microsoft Edge provides tools to manage cookies directly within the browser, allowing you to view, edit, and delete cookies as needed.
In this guide, we’ll show you how to manage cookies in Microsoft Edge so that you can maintain a balance between convenience and privacy.
How to View Cookies in Microsoft Edge
To inspect the cookies stored by websites:
Step 1: Open Microsoft Edge
Launch the Edge browser on your device.
Step 2: Access Developer Tools
Press Ctrl + Shift + I (Windows/Linux) or Cmd + Option + I (macOS) to open the Developer Tools. Alternatively, right-click on a webpage and select Inspect.
Step 3: Navigate to the Application Tab
In the Developer Tools pane, click on the Application tab. If it's not visible, click the >> icon to reveal more tabs.
Step 4: View Cookies
- In the left sidebar under the Storage section, click on Cookies.
- Select the domain of the website whose cookies you wish to view.
The right pane will display all cookies associated with that site, including details like Name, Value, Domain, Path, Expires/Max-Age, Size, HttpOnly, Secure, SameSite, and Priority.
Understanding Various Options To Filter and Delete Cookies
Lets move from left to right to understand the various options provided to us.
- Refresh: This button refresh the list of cookies.
- Filter: You can filter the list of cookies by name, value or domain.
- Clear all cookies: Clears the whole list of cookies.
- Delete Selected: If you select a cookie then this button gets activated and allow you to delete only that particular cookie.
- Only show cookies with an issue: It filters the list to showcase only those cookies which issues.
How to Delete Cookies in Microsoft Edge
To remove cookies, either individually or in bulk:
Step 1: Open Microsoft Edge:
Launch the Edge browser on your device.
Step 2: Access Settings:
- Click on the three-dot menu (...) in the upper-right corner.
- Select Settings.
Step 3: Navigate to Cookies Settings:
- In the left sidebar, click on Cookies and site permissions.
- Click on Manage and delete cookies and site data.
Step 4: Delete Specific Cookies:
- Click on See all cookies and site data.
- Use the search bar to find cookies from a specific site.
- Click the down arrow next to the site name to expand its cookies list.
- Click the trash can icon next to individual cookies to delete them.
Step 5: Delete All Cookies:
- On the See all cookies and site data page, click on Remove all.
- Confirm by clicking Clear.
Understanding Various Fields and Edit them
1. Fields of a Cookie:
The complete information about the cookie is separated under various fields shown below:
- Name: Displays the name of the cookie.
- Value: The actual value stored in the cookie. Sometimes it is encoded and not understandable.
- Domain: The hosts which allowed to receive the cookie.
- Path. It is the part of URL that exist in the requested URL.
- Expires / Max-Age: Permanent cookies have an expiration date or maximum age of the cookie. Session cookies last until the browser is closed so the value is always "Session".
- Size. Max Size(in bytes) of the cookie.
- HttpOnly: If a tick is there than it indicates that the cookie can only be used over HTTP.
- Secure: If a tick is there than it indicates that the cookie can only be sent over HTTPS.
- SameSite: It allows you to control whether or not a cookie is sent with cross-site requests. The possible attribute values are:
- Strict: It sends the cookie to same site that set the cookie.
- Lax: This is the default behavior if the "SameSite" attribute is not specified(means blank). It sends cookie when a user is navigating to the origin site from an external site.
- None: It sends the cookie with both cross-site and same-site requests.
- Partition Key: It indicates that the cookie should be stored using partitioned storage.
- Priority: It allows servers to protect important cookies. Possible values are low, medium (default), or high.
2. Edit Fields of a Cookie:
To modify specific cookie attributes:
- Follow Steps 1-4 from the "View Cookies" section to access the desired cookie.
- Edit Cookie Fields:
- Double-click on the field you wish to edit (e.g., Value, Domain).
- Enter the new information and press Enter to apply the changes.
Note: Editing cookies can affect your browsing experience and may lead to unexpected behavior on websites. Proceed with caution.
Handling Cookies with JavaScript
You can use JavaScript to read, create, update and delete cookies in your site. JavaScript uses the document object and cookie property to handle cookies. Let us understand one by one all operations done with the cookies using JS. All the code is executed using the HTML, CSS and JS IDE of GFG so, to test the code copy the below JS code under a script tag.
1. Create a Cookie:
You can set the cookie using "document.cookie" property the values to be passed are name, value, expiry date and path. In the below code a myCookie() is called by passing the name, value and expiry days of the cookie. Its uses the date object to set the expiry date of the cookie in UTC.
function myCookie(name, value, days) {
// variable used to store expire date in UTC
let expires = "";
// checks if user passed the expiry days
if (days) {
const date = new Date();
// set the date object time to the expiry time in miliseconds
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
// sets the approprate cookie format which
// will be used in creation of the cookie
expires = "; expires=" + date.toUTCString();
}
// creates the cookie
document.cookie = name + "=" + value + expires + "; path=/";
}
myCookie('GFG', 'Hello World', 2);
// This creates a cookie named 'GFG' with the
// value 'Hello World' that expires in 2 days.
Output:
2. Read a Cookie:
You can use "document.cookie" property to get all the cookies and there value. It will return all cookies with there values separated by ';' in the format cookieName=value; .
Use the below code to get all cookies at once.
let allCookies = document.cookie;
console.log(allCookies);
Output:

You can also get the cookie with respect to a given name. We create a readCookie() which takes a name parameter. The "document.cookie" property returns all the cookies name with value so, to get a particular cookie we first split the cookies into an array of string of cookieName=value. The function then removes any initial space in the strings and then check for the name of the cookie if its matched then it returns the value of the cookie.
function readCookieWithName(name) {
// Your cookie name with = sign
const nameEQ = name + "=";
// Spilits all the cookies to only name=value string array
const cookies = document.cookie.split(';');
for(let i = 0; i < cookies.length; i++) {
let cookie = cookies[i];
while (cookie.charAt(0) === ' ')
// Removes the starting space in each string of the array.
cookie = cookie.substring(1, cookie.length);
if (cookie.indexOf(nameEQ) === 0)
// Returns only the value part of the matched cookie name
return cookie.substring(nameEQ.length, cookie.length);
}
return null;
}
// Reading a cookie of GFG site with name gfg_theme
let mycookie = readCookieWithName('gfg_theme');
console.log(mycookie); /
Output:
3. Update a Cookie:
You can edit a cookies name, value, path and expiry days using the document.cookie property. Just have the updated value in sting and pass it into document.cookie property.
function updateCookie(name, value, days) {
// Variable use to store the expiry date
const expires = new Date();
// Sets the expiry date with respect to current time
expires.setTime(expires.getTime() + (days * 24 * 60 * 60 * 1000));
// Updates the cookie with new values
document.cookie = `${name}=${value};expires=${expires.toUTCString()};path=/`;
}
updateCookie('GFG', 'HI GFG', 10);
Output:
4. Delete a Cookie:
Set the cookie's expiration date to a past date. Example:
function deleteCookie(name) {
// Changes the value to empty string and set the expiry time to a past date
document.cookie = `${name}=;expires=Thu, 01 Jan 2000 00:00:00 UTC;path=/;`;
}
deleteCookie('GFG'); // On function call it deletes the GFG cookie.
Output: You can see GFG cookie is not present in the image below.
Conclusion
Managing cookies in Microsoft Edge is a crucial step for maintaining your privacy and browser performance. Whether you want to view, edit, or delete cookies, the browser provides powerful tools to control your data. By regularly cleaning up your cookies or adjusting your settings to block unnecessary cookies, you can enjoy a smoother and more secure browsing experience. Understanding and managing cookies in Edge ensures that you remain in control of your data while browsing the web in 2025.