English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How can I open a cookie file that has been stored on my harddrive???. I am creating a site and wanting to set cookies so that users can log in and out automatically, howevr surely if you are storing info to login on a computer it is open to abuse. i.e. could i not open the cookie file and change for example the username and then login as someone else? or is it not possible to open a cookie file?

2007-03-07 06:38:48 · 2 answers · asked by jonnie b 1 in Computers & Internet Programming & Design

2 answers

From the web server you don't interact with cookie files directly. To have the cookie saved in a cookie file, you send the cookie in the response header back to the user's page request, and you give the cookie an expiration date in the future that then causes it to persist in a file. Then the cookie will be sent back to you in the request headers. The saving part into an actual file on the user's machine is handled automatically by the browser, as is the reading and sending it back to you in the page requests.

Statements on how you exactly set and read cookies on the server depends on your programming language, and framework you're using, all though work the same underneath, as described above.

As for security:
When you set the cookie, it can only be read by your web site. But if the requests are over a non-secured connection (http), you should take care not to store sensitive information in the cookie, because then it can be intercepted.

2007-03-07 07:23:48 · answer #1 · answered by Raymond 3 · 0 0

This is where windows places cookies in most cases:
C:\Documents and Settings\"USER ID"\Cookies

2007-03-07 06:41:14 · answer #2 · answered by Mictlan_KISS 6 · 1 0

fedest.com, questions and answers