如何在windows商店应用程序中的注册表中存储数据? [英] How to store data in registery in windows store apps?
问题描述
您好
我正在制作Windows应用商店。
目前,我正在使用cookies,但我面临的问题是因为< span id ="x_x_ctl00_ContentPlaceHolderLeft_repeaterMessages_ctl00_LabelThreadMessage">
用户可以禁用cookie。
那么还有其他的cookies选择吗?
注册表是Windows商店应用程序的方式吗?
如果是这样,我发现"Metro风格的应用程序无法访问注册表"..
<请提供一些解决方案。
您可以使用标准的WebStorage - localStorage或者适合数据要求的sessionStorage。
https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
https://developer.mozilla.org/en-US/ docs / Web / API / Window / localStorage
$
这是一篇MSDN文章,讨论不同的选项,包括使用IndexedDB。 IndexedDB是一个功能强大的API,它可能太复杂而无法替代cookie:
https://msdn.microsoft.com/en-us/magazine/jj991982.aspx
Hi
I am making windows store app .
At present, I am using cookies but i am facing issue because user can disable cookie.
so is there any other alternatives of cookies?
Is registry is the way for windows store apps?
If so , I found that "Metro style apps cannot access the registry"..
Please give some solution.
You can use the standard WebStorage - either localStorage or sessionStorage which ever suits data requirement.
https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
Here's an MSDN article discussing different options including the use of IndexedDB. IndexedDB is a powerful API and it may be too complex to be a replacement for cookies:
https://msdn.microsoft.com/en-us/magazine/jj991982.aspx
这篇关于如何在windows商店应用程序中的注册表中存储数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!