Webstorage local variables, limits, data safety

0 favourites
  • 7 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I'm planning on doing save/load using Webstorage local data management. In the earlier topics at forum you mentioned this data is stored in web browser's cache - so when someone clears cache, it's pretty much gone.

    1. I need a possibility to import/export save game data into separate file(s) (using external app). Is there a way to figure out webstorage's local data location for my external app?

    2. What are the disc space limits for webstorage data stored on local machine? Are they browser-specific?

    3. Can the data stored locally be considered safe?

    4. I'm making an offline game with Construct 2 (not utilizing any of the HTML5 features). AFAIR there's Construct Classic but it doesn't seem to be supported anymore. What would you advise? Stick with Construct 2 and hope for new export platforms that'll allow easy save/data storage or maybe switch back to Construct Classic and hope that created games will work on all machines?

  • 1. dunno

    2. dunno, but I think browser's cache can have a configurable size limit... don't remember

    3. it depends on what you mean by that.

    4. Construct Classic isn't dead. Some contributors are still working on it (plugins, bug corrections,...). Also, construct classic makes exe files and only exe. These games will only work on windows OS.

  • 3. Safe... meaning, they won't be overwritten by other cache data (for example if there's 5MB cache buffer and game wasn't played for one year).

  • 3. Then I think it's not safe. Temporary datas aren't meant to keep datas in a long run.

  • 1. I need a possibility to import/export save game data into separate file(s) (using external app). Is there a way to figure out webstorage's local data location for my external app?

    I don't think WebStorage has any particular location on disk, but HTML5 is getting a File System API which should help. Hopefully a plugin will appear for that in future.

    . What are the disc space limits for webstorage data stored on local machine? Are they browser-specific?

    It's browser specific, and I think it was around 5 mb... WebStorage was intended as a replacement for cookies.

    . Can the data stored locally be considered safe?

    I'm not sure when it gets cleared - you might want to test if clearing the cache frees it, because the AppCache (offline support) isn't cleared by clearing your browser cache I don't think. Also, as far as security goes, all webstorages on the same domain share the same storage. So all HTML5 apps on Scirra.com use the same storage.

    . I'm making an offline game with Construct 2 (not utilizing any of the HTML5 features).

    What do you mean by making a game in Construct 2 not using any HTML5? Games in Construct 2 use HTML5 specific features (like canvas) to run at all, you can't run a Construct 2 game without HTML5.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I don't think WebStorage has any particular location on disk, but HTML5 is getting a File System API which should help. Hopefully a plugin will appear for that in future.

    Thank you, it looks like it's exactly the thing I'm looking for...

    html5rocks.com/en/tutorials/file/filesystem

    html5rocks.com/en/features/file

    caniuse.com

    Quick search brought those results -> looks like it'll take some time before the main browsers will support writing to sandboxed file system. I'm not a specialist in HTML5 though.

    hat do you mean by making a game in Construct 2 not using any HTML5? Games in Construct 2 use HTML5 specific features (like canvas) to run at all, you can't run a Construct 2 game without HTML5.

    It was a little clumsy way of saying I won't be needing any benefits HTML5 provide: multi-platform support, accessing server data (facebook, AJAX) etc. so I'm perfectly fine with Construct Classic's Win32 app export if it's stable enough.

  • The web storage HTML5 spec gives 5 mb as base storage.

    The wikipedia page indicates that IE proposes up to 10 mo (it's funny, I remember having read another article somewhere that told that Chrome was providing up to 10 Mo whereas the other browsers only 5).

    Anyway, for strict datas (like array of values), 5 Mo should take a while to fill, and the user should have a popping window to make more space available if the limit is reached.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)