对于 IE7 和 IE6,将backbone.js 与 localStorage 结合使用的最佳实践是什么?
我正在使用backbone.js、back 和socket.io 开发一个应用程序,但我在ie7 和ie6 上的localStorage 上遇到了麻烦。
您以前是否曾追求过 IE7/Windows Phone 与主干网的兼容性?您存储模型客户端的解决方案是什么?
I'm developing an application with backbone.js, back and socket.io, and I'm running into trouble with localStorage on ie7 and ie6.
Have you chased IE7/Window Phone compatibility with backbone before? What was your solution for storing the model client-side?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
根据 Bryan Bailliache 的回答,我为 Backbone.js 创建了一个无缝的 Amplify 后端,您可以查看 https:// /github.com/dev360/Backbone.amplify。希望它有用。
Based on Bryan Bailliache's answer above, I created a seamless Amplify backend for Backbone.js, you can check out https://github.com/dev360/Backbone.amplify. Hope it's useful.
AmplifyJS 项目有一个存储抽象,
由于它适用于 IE 5+,因此应该可以解决您遇到的问题。
不幸的是,我还没有完成 WinPhone 兼容性,但我已经完成了 Windows 的 IE 7+ 兼容性,并且 AmplifyJS 项目满足了我的要求。
The AmplifyJS project has a storage abstraction that
Since it works on IE 5+, that should fix the troubles your having.
Unfortunately I have not done WinPhone compatibility but I have done IE 7+ compatibility for Windows and the AmplifyJS project met my requirements.
我需要同样的东西。
由于这个问题已有 1 年历史,https://github.com/dev360/Backbone.amplify最后提交 2 年前,并且不是最新的 Backbone.localStorage 版本
我使用 Amplify 做了一个新的 Backbone.localStorage
https://github.com/fadomire/Backbone.amplifyLocalStorage
我会尽力保持下去到目前为止并解决问题,但没有保证。
I needed the same thing.
As this question is 1 year old and https://github.com/dev360/Backbone.amplify last commit 2 years old and not up to date with current Backbone.localStorage version
I did a new Backbone.localStorage using Amplify
https://github.com/fadomire/Backbone.amplifyLocalStorage
I'll try to keep it up to date and fix issues, but no guarentee.
Backbone.js 页面有一个演示“ToDo List”应用程序,该应用程序附带一个 localStorage 适配器。我会修改它,检查 window.localStorage 并回退到使用 cookie 或对后端的 ajax 调用。
The Backbone.js page has a demo "ToDo List" app that has a localStorage adapter that comes with it. I would modify this, check for window.localStorage and fallback to using cookies or an ajax call to the backend.