How to Change Cookie Expiration Date [Chrome, Firefox]
Whenever you log into a website or forum these days with a user name and password, the chances are pretty good there will be a couple of additional tick boxes, one of which is the “Remember me” option.
This feature is there for the purpose of keeping the user logged into the website for a certain period of time. Even if you close your browser and come back to the site later on or the next day, you will still be logged into the same site and not required to manually re-enter the login details. When you enable the Remember Me option, your login details are stored in a cookie with your browser and the length of time that you remain automatically logged in depends on the expiry date the cookie has been given.
This date is set by the website developer and could range from a matter of hours, to even several years meaning if you don’t delete the cookie, you could still login automatically in a year or two’s time! As you have no control over how long a website will keep you logged in by default, it can be annoying if you frequently visit a website and it logs you out after a few days or a week, or alternatively, another site might keep you logged in for months or years at a time while the cookie is still there and you would prefer a shorter expiry time.
A cookie is more complicated than simply opening it up with notepad and changing a few values, and changing the expiration date on one can’t be done unless using a browser or 3rd party piece of software. Here’s a selection of ways to edit the expiry date on a cookie, one for each of the 4 main browsers; Internet Explorer, Google Chrome, Mozilla Firefox and Opera.Mozilla Firefox
A search on the web to edit cookies will likely produce most results for a Firefox add-on called “Add N Edit Cookies” which unfortunately appears abandoned and doesn’t work with versions of Firefox above 3. Happily an add-on based on it called Cookies Manager+ does work on the latest versions of the Firefox browser. And being a cookies manager, it can also delete and block as well as create new cookies.
After installing the Cookies Manager+ add-on, you can access it via the Firefox menu -> Web developer -> Cookies Manager+. Selecting the cookie you want to examine will also list its expiry date at the bottom of the window, and if you want to edit it, simply click the button.
Then making sure the Expires box is ticked, edit the expiry date using the drop down, boxes and pop out calender. After you’re done, click Save.
Internet Explorer
As Internet Explorer doesn’t use extensions in the same way Firefox and Chrome do, you have to resort to a 3rd party utility for the task. One you can use is a free and portable tool by Nirsoft called IECookiesView, and this tiny little program of around 50K is a cookie viewer and manager for Internet Explorer versions 4 and above.
Run IECookiesView and it will list all your Internet Explorer cookies. To edit a cookie, click on the website in the upper window, then all the related cookies for the site will appear at the bottom window. From there you can see their expiration date column. Right click on the Key and select Edit The Cookie’s Content which will open a new window where you can change the date either by typing in directly or from the pop up calender. Then press Modify Cookie and confirm.
IECookiesView has options to view the cookie in Notepad or Wordpad and also export to a Firefox cookies file in addition to various deleting and erasing functions. If for whatever reason the program can’t find your cookie files they can be manually located using the Select Cookies Folder option. Works in Windows 95 and above.
There is cookie expiration editing for more web browsers on the next page.
Google Chrome
Like Firefox, Google Chrome has an add-on extension to handle the editing of the expiry date inside a cookie. It’s aptly called Edit This Cookie and can be downloaded from the Chrome Web Store. This extension also allows you to delete, add new and import/export cookies in addition to editing.
After installation, a new cookie icon appears on the Chrome toolbar and this tool runs slightly differently to the Firefox one by editing the cookies for the site currently in the active tab. Once the icon button is clicked on, one cookie will be displayed at a time and you simply click on another one to expand it and reveal it’s details including expiry date. Click on the date to change it, which pops up a window with tumbler like buttons to alter the date and time. One problem we had was the buttons didn’t seem to move when clicked on or scrolled over although after pressing Set it seemed to have changed the date in the main window. Submit cookie changes will save the cookie’s new date.
A potentially very useful feature is the button to set the cookie as read only and preventing it from being overwritten which is what some websites will do, and that obviously resets the expiration date back to the default value. Make sure to edit the cookie and click the submit button BEFORE clicking the “Set as read only” button. Likewise, make sure it is turned off again before any future editing of the cookie.
Opera
If you use Opera and want to edit a cookie and its expiry date you have it pretty easy because there is already a built in cookie editor and there’s no need for 3rd party add-ons or tools.
After you have visited the site with an expiration date you want to edit, go to the Opera menu -> Settings -> Preferences or simply press Ctrl+F12. Click on the Advanced tab, select Cookies down the left side and then finally press the Manage Cookies button. The list of available sites that have saved cookies will be shown and you can expand the chosen site to be edited and show all the related cookies. Click on the desired cookie and then the Edit button on the right to open the information window.
The window is pretty self explanatory and you simply edit the date in a Year-Month-Day format. Then press OK when you’re done. The Opera browser could be a useful download if you constantly want to edit website cookies because of its in built editing function.
Editor’s Note: It’s worth noting that extending the login period for a cookie on shared computers is not recommended because the cookie basically contains your user name AND password details and could be vulnerable. The same applies to important sites and those of a personal or financial nature.
as always, excellent tips!