Webstorage removed from Chrome Apps?

0 favourites
  • 12 posts
From the Asset Store
Customize the animation of character when item changed
  • Noticed that r191 included the following changelog notice:

    [quote:1mflhdmz]WebStorage: worked around crash caused by the fact Chrome Web Store apps have removed local storage support. WebStorage now does nothing in Chrome Web Store apps. We have requested that Google add support back.

    This seems like kind of a big deal.<img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">

    I can't test this myself ATM, but I was wondering if anyone else has noticed this or would be willing to confirm it?

    Here's Ashley's chromium bug report; please chime in if you are seeing the same issue:

    https://code.google.com/p/chromium/issu ... ?id=439027

  • Hi,

    Does this mean that we can no longer use the webstorage local feature to save game data and setting etc?

    Thanks

  • What about cookies?

  • newt

    Last time I checked, they're good with milk.

    Seriously, though, I think there was a C2 plugin that let you set normal cookies, but they aren't secure ie., the user can easily see and modify them (my hi scor iz 9,999,999,999,007!!!).

    So, that's a drawback.

  • If they can maip cookies, then they are smart enough to get at webstorage too.

    Just looking at workarounds as always.

  • I think the savegame system will still work, because internally it uses IndexedDB first if it's supported, and I think Chrome apps still support that. Unfortunately if Chrome don't support localStorage again then the WebStorage object will do nothing in Chrome apps (writes will be ignored and reads will return empty).

  • Ashley

    This situation is very unfortunate however as a place holder to maintain WebStorage and legacy. Why not in the meant time shim local storage. At least until Google finally capitulates and brings back localstorage; which is silly to remove.

    indexDB loads the save information when the app starts. This is done prior to any WebStorage the c2 app uses.

    All use of WebStorage localstorage works only on temporary in memory data.

    then developers can make a choice on how often the temp storage is saved to the asynhronous long term storage(indexDB?)

    1. On change.

    2. On Layout change

    3. Only on Action

    This way the old system doesn't break as synchronous data storage is maintained. Speed(negligible) is improved as it's always memory storage.

    Alternatively there could be a more advanced storage system. There is the one above that could be simple and automated. However the one above I would have concerns about large groups of data using lot's of memory. So an option would to provide an AJAX style memory system for large blobs of data and the above sample for small chunks.

    And finally I would also like to add this.

    local storage and session storage by default without user intrusion have limits of 5mb each. To by pass that 5mb require permissions and or user request. 5mb is small, but fine most of the time.

    indexDB offers 50mb as a base storage before requiring user intrusion to functioning of the app.

    So there are solutions to the problem. I don't really feel that the suggestions are hacky, but instead more in line with the intention of how indexDB should work. Instead of assuming that every piece of information is now based on ajax. Now the main storage Dictionary is ajaxed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is awful, we all need to msg chrome and let them know we need that in our engine.

  • jayderyu - it's a good idea, but it's probably going to be slow or flakey - either you write the entire storage on every change, which if you make 100 changes in a row with 1mb of local storage means you immediately run 100mb of writes, or you batch them up on a timer or some such, and then you simply lose data if the user quits before the writes happen. There could be an action to flush WebStorage, but then it only exists for a single platform and does nothing else anywhere, and you still have a new porting barrier since to make an existing project work on the CWS you need to go through adding "flush storage" actions in the right places.

    I really don't like the fact the Chrome team are willing to turn off random web platform features, since it bodes very badly for portability of existing web content, so I don't think it's even in their interest to do it! I don't want to encourage them to do it again, so I'd rather fight this case and get it put back than find a workaround.

  • Ashley

    good luck on the fight. I think turning off localStorage is silly and a feature that should be restored.

  • Ashley and eveyone else.

    Is this issue only effects from new updated chrome app package version ? My old published games( about 1 year ago) seems to still work.

  • tumira - I think so, but Google are gradually phasing out the older formats, and forcing everyone to upgrade to the new format which has this problem.

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