Write and Read A Cookie

Tutorials Shared by the Internet Community


Write and Read A Cookie

Cookies enable you to write text directly to a users computer.


  • Total Hits - 36715

  • Total Votes - 111 votes

  • Vote Up - 50 votes

  • Vote Down - 61 votes

  • Domain - www.codeave.com

  • Category - ASP/Cookies and Sessions

  • Submitted By - Devesh Khanna

  • Submitted on - 2008-03-06 09:09:43


ookies enable you to write text directly to a users computer*. This can be used to easily recognize if a user has been to your site before or used to prevent multiple entries in to forms. The example below will take any input you type in and write it to a cookie.

A hyperlink to the same page is created to demonstrate on subsequent visits (within 3 days) the user will see their input rather then the text input box. To see the cookie on your PC locate your cookie directory (typically located in C:WINDOWSCookies) and find the one named www.codeave.txt. *The ability to write cookies to the PC can be restricted by the user by changing security options.    More detail...

Broken  |   Save  |   Liked  |   Down

E-Books Store