Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving without cookies?

Status
Not open for further replies.

iwuvc

Technical User
Joined
Jan 11, 2006
Messages
10
Location
US
Because I am having extremely wierd problems with cookie saving, is there a way to save files on clients computer? If not possible on client is it possible on server? I have tried searching google and going through books, but I haven't been able to find anything useful.
 
is there a way to save files on clients computer
Perhaps you should tell us what you're trying to achieve.
- What information are you trying to save?
- What problems are you having with cookies?

---
Marcus
better questions get better answers - faq581-3339
accessible web design - zioncore.com
 
Well, I'm making a funny little game. So the cookie or what anybody else has to offer must be able to store more than one value inside the file. ie strength, hp, etc. My current problem with cookies: Ok, I set a cookie value clicking a button. Then I click the read cookie button. It will read the cookie just fine. But if I close the browser and go back to the page, the cookie returns null. I have tried with 3 different browsers on 3 different machines. The max I am likely to store per variable is 20 bytes. ie like a .ini file or something where it would look like:
str=20
hp=25
gold=1000
 
Sounds like he cookies you're setting are session cookies - they expire once you close the browser. You need to include an 'expires' variable (set to a future date, obviously!)

There's some more information in this JavaScript Cookie article.

---
Marcus
better questions get better answers - faq581-3339
accessible web design - zioncore.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top