Question

This has been a hard question for me to track down. I am creating a windows 8 HTML5/JS app to be deployed into the windows 8 marketplace. I am using the construct2 game engine to generate the html5/js code.

In a traditional Html5 website if I was to write data out to web-storage, that data is treated similar to cache data and is susceptible to being erased when a user clears their cache (i believe?)

My question is, in windows 8 html5/js apps. Is the data written to webstorage susceptible to being cleared when a user would go in and clear their internet explorer cache, or is the webstorage data packaged up different for windows8 apps and thus unique to the app?

Was it helpful?

Solution

The "Local" subset of Construct 2 WebStorage maps to HTML 5 localStorage which, in turn, maps to applicationData.localFolder in Windows 8, and that is maintained on a per-application basis. You can store up to 10MB per app via HTML5 localStorage (and thereby Construct 2 WebStorage's set local value action.

It's not affected by what you do in Internet Explorer, and it will persist even when you update your application.

Construct 2 also exposes sessionStorage, but as you'd expect for a Windows 8 application that storage persists only for the current execution of the app, much as it persists only for the current browser session in a traditional web scenario.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top