Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm wondering if there is an extension to automatically rewrite cookie expiration dates (either automatically for all sites or with a single-click button for the current site) for Google Chrome?

A lot of sites have cookies that expire a day/week/month from login, and for a personal PC with an encrypted hard drive, it can get a little annoying.

share|improve this question

I'm not sure if there's any existing extension to modify the expiration dates of cookies on the client side, but it would be pointless for authentication cookies: The expiration date wouldn't provide any security if it wasn't stored on the server side.

The expiration date Chrome respects simply indicates The server won't accept this cookie anymore. It's useless now.. So even if an extension would modify that information, the server would just reject the cookie.

share|improve this answer
To the best of my knowledge, your answer is not correct. Servers set the expiry date for a cookie, but they are not responsible for expiring it. Only with cookies that are mapped to server-side session IDs is it possible for the server to know the cookie has expired. The client is 100% responsible for expiring the cookie. If the client sets the machine date back, you can always use a cookie that "should have been" expired, assuming no encrypted timestamp in the cookie contents. – Mahmoud Al-Qudsi Nov 20 '12 at 4:15
Servers [...] are not responsible for expiring it. Of course they are. The whole point of expiring an authentication cookie is to provide some security against cookie theft. Only the cookies on the devices you currently use have a non-expired cookie; all the cookies you might have left once on other devices are useless by now, so you don't have to worry about them anymore. Furthermore, if somebody does gain access to one of your cookies, it will only serve him for a limited amount of time. All these benefits would been nullified without server-side checks for expiration. – Dennis Nov 20 '12 at 10:46
@Dennis You could say that servers are indirectly responsible for expiring cookies... but Mahmoud is correct. Server sets the expiration date, but only the browser can do the actual expiring of the cookie. In other words, the browser will keep sending that cookie on any requests to the cookie's domain until the expiration date. The server can, of course, choose to overwrite the cookie with a new expiration date. – simmbot Nov 6 '14 at 0:40
up vote 1 down vote accepted

There is no extension for Chrome that will automatically rewrite the expiry date for incoming cookies at this time (that I have been able to find). This is theoretically possible, but I don't know if the Chrome extension API grants access to modify cookies for all websites willy-nilly.

share|improve this answer

Chrome configuration

I'm not sure what you'd like to do here and which cookies you'd like to expire, but you can configure Cookie exceptions in Chrome by setting cookies of individual domains to:

  1. Clear on exit - every time you reopen browser and go to the same site, no are present; best for web shopping sites because some of them tend to adjust prices based on your previous views (usually raising a little so you're more willing to buy thinking the price is going to rise)
  2. Block - completely blocks cookies for particular domains
  3. Allow - normal behaviour that is here because you can have global settings and then set exceptions; if you'd have global block, you could allow individual domain cookies;

In Chrome v21 just go to:

Wrench (main menu) >
  Settings >
    Show advanced settings >
      Content settings... >
        Cookies -> Manage exceptions...
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.