在网络应用程序中存储小UI用户偏好的最佳方式? [英] Best way to store small UI user preferences in web app?

查看:130
本文介绍了在网络应用程序中存储小UI用户偏好的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网络应用程序,我正在开发,并很相似的想法,如果用户更改UI的视图(例如,列表打开或关闭,某些查看首选项),这些更改保留在他们关闭浏览器和


  • 使用HTML5本地存储(没有此体验)

  • 存储在mySQL数据库中(不希望在数据库中存储这些琐碎的数据)

  • 一旦存储,我将在用户返回时检索这些首选项



    有没有任何人有这种类型的功能的任何经验,可以建议最好的UI状态的方法保存和检索?

    解决方案

    如果这么小,您应该将UI设置json对象存储在自己的数据库。



    这会让用户在结束时遇到更少的问题,比如缓存清除和本地存储不支持的浏览器。



    它还将使用户可以在不同的计算机或浏览器上使用UI设置。


    I have a web app I'm developing and quite like the idea that if the user makes changes to the view of the UI (eg. Lists open or closed, certain viewing preferences) those changes remain after they close the browser and visit the web app at a later date.

    Possible options I can think of:

    1. Store UI preferences JSON object in cookie.
    2. Use HTML5 local storage (no experience of this)
    3. Store in mySQL database (not keen on storing such trivial data in the DB)

    Once stored I will retrieve these preferences when the user returns and set the UI as it was when they last left it.

    Does anyone have any experience of this type of feature and can suggest the best method for UI state save and retrieval?

    解决方案

    If it's so small you should probably store the UI settings json object in your own database.

    That will leave users with less problems at their end, like cache clearance and local storage unsupported browsers.

    It will also make it possible for users to use the UI settings across different computers or browsers.

    这篇关于在网络应用程序中存储小UI用户偏好的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆