Can you edit a cookie on your hd?

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
Take for example, the cookie gmail puts on your hd to remember your login. It expires after 2 weeks, so you have to retype your email/password. Is it possible to edit that cookie so it lasts longer than 2 weeks, or lasts forever?
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
No. The .txt file in your Internet cache is simply the data of the cookie. Cookie expiration is sent through HTTP response headers like thus. However, it's possibly a proxy can intercept it and change it.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
So the web server keeps track of all the cookies that have been sent out and when they expire?
 

Thyme

Platinum Member
Nov 30, 2000
2,330
0
0
I may be wrong, but I don't believe cookies are stored on the server. It's possible, however, that Google's cookies are sessionids and they keep sessions on their server which are destroyed after 2 weeks.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
Yeah, the cookie data is stored in Temporary Internet Files, but the server has control over for how long that cookie is valid. It has a small record that the cookie exists on your PC, I believe. I'm not sure how secure of a system it is and if it is hackable or not, but I know the way it's supposed to be: the server is supposed to say how long the cookie can exist.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
The server does not keep track of cookies whatsoever. The webserver creates cookies, and sends them to your browser, at that point it forgets all about them.

When you visit a website, the webserver will ask your browser for any cookies that it has (for that particular server, not all the cookies on your machine), and your browser will send those cookies to the server. The server can then inspect them to find out any information that it had previously told your browser to save (such as the fact that you're logged in to a website).

Cookie expiration is handled by the web browser. When the webserver sends cookies to your browser, it gives expiration times for them, but there is nothing forcing browser developers to actually delete cookies at the scheduled expiration time. You could very easily write a HTTP client (a browser, basically) that forged cookie data.

You can think of a cookie like an ID card. A server gives you an ID card with specific data on it, including the expiration date for the ID card. Sometime later, when you come back to the server, it asks to see your ID card, if you have one. Your browser then gives that card to the webserver, so the server can see who you are.

There is nothing stopping your browser from forging an ID Card. They're plain text files, so if you know what data is supposed to be in them, you can edit them in a plain text editor. Also, if someone were to copy cookies off your computer, they could use them to gain access to websites you had logged into from any other computer they copied those cookies to.

But no, the server doesn't store cookie information, browsers do.
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
239
106
Editing won't help - an edited cookie looks like no copkie to the source, so when you visit that site, it will add another replacement.

Take a look at Roboform and do away with cookies.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: corkyg
Editing won't help - an edited cookie looks like no copkie to the source, so when you visit that site, it will add another replacement.

Take a look at Roboform and do away with cookies.
Of course it could 'help'. The expiry date isn't sent back to the server so changing that will only cause you browser to hang onto the cookie longer and the server will think it's the same as any other cookie. You just can't change the cookie name. The only exception is if the server purposely overwrites the cookie every time you visit, in which case you could just change the cookie after every visit.
 

homercles337

Diamond Member
Dec 29, 2004
6,340
3
71
Originally posted by: notfred
The server does not keep track of cookies whatsoever. The webserver creates cookies, and sends them to your browser, at that point it forgets all about them.

QFT