dsbruqxgt820011351 2015-09-28 04:13
浏览 43
已采纳

有没有办法离线记录用户的活动并在线时更新它们? [关闭]

I just want to allow users make modification offline with insecure data. Namely modifying their profile name, add new content (page), photos and so forth. When they come online all these activities must be updated accordingly in the online server.

I need some vast ideas on this. It's going to be a web app, mostly sort of personal website.If I were to do this app, should I ensure they have mysql and wamp server installed so that offline changes can be recorded in the local host?

I refer to few forums and some of them mentioning html5 localstorage. Here's one of them: Mobile site/app - capture data offline and push to live database

The site to be developed mainly in PHP, MYSQL, HTML5 and JQUERY.

  • 写回答

1条回答 默认 最新

  • dtddjq9637 2015-09-28 05:15
    关注

    If you don't want to bother your users on how to install some programs in order to store their data while offline - (this process should flow unnoticed or with less pain for the user as possible) I suggest you going for LocalStorage - If you're fine with 10MB (Chrome and Firefox, 5MB on mobile) of user disk quota.

    Need more space?

    Cache API as an interface of the ServiceWorker API

    A service worker is an event-driven worker registered against an origin and a path. It takes the form of a JavaScript file that can control the web page/site it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available.)

    IndexedDB :

    Worth knowing that (FF at least) all IndexedDB bases (from multiple sources/websites) cannot take more than 50% total disk size - and from that size one IDB cannot take up more than 20%. Also, according to Least Recently Used Policy, if the databases available space gets full, the browser can (and will) kill an IndexedBD.

    Note that for older browsers that do not support IndexedDB you might want to use a shim to fallback to Web SQL Database (which is no longer maintained)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。