Forum Moderators: open

Message Too Old, No Replies

Using cookies to store data from local webpage to local machine...

         

rexrhino

1:55 am on Aug 17, 2004 (gmt 0)

10+ Year Member



I am working on an interactive fiction program, and decided to do it via javascript because it was the simplest way to make it multiplatform.

However, I am curious on what is the best way to store data on the local machine? I am assuming the only option I have is cookies, but I am not sure of behavior of cookies from a local file.

I know that they say max size of a cookie is 4K, but is that the max cookie size for most browsers when browsing a local HTML file? Will cookies even work in most browsers for a local file? Is there some way around the normal security limitations if you are browsing a file locally?

Is there any other way to store gamestate?

Bernard Marx

12:19 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



is that the max cookie size for most browsers when browsing a local HTML file?

Yes, I think so.

Will cookies even work in most browsers for a local file?

Yes

Is there some way around the normal security limitations if you are browsing a file locally?

The user may be able to lower security restrictions for local files. With this in mind, if you are thinking of reading/writing text files locally, then the best option would be to use an HTA, which is perfectly suited to this purpose - but then "cross-platform" goes out of the window.