HTML表单脱机工作 [英] HTML forms working offline

查看:97
本文介绍了HTML表单脱机工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要能够离线运行HTML表单。我的意思是他们必须在没有直接连接到Web服务器的情况下工作。

在我5年前编写的应用程序中,我通过实现自定义协议处理程序来完成此任务 - 当用户发起表单提交时,生成的HTTP请求被本地记录。在稍后与服务器的连接变得可用时,同步程序循环收集的请求并将它们提交给服务器收集响应并再次将它们保存在本地供以后使用。





对HTML5的支持目前非常有限。谷歌齿轮?或者我应该回去继续使用协议处理程序和自定义同步器?

解决方案

我会说HTML5。并非所有的浏览器都支持它。但都会。与此同时,我认为最好是说让离线功能尝试这样或那样的浏览器,而不是请下载这个庞大的插件,带有许多可怕的警告。



<另外一个简单的人口统计数据:HTML5在所有浏览器中占5%? 10%?仍然远远超过已安装Gears的用户的0%。



真的很可惜,这要感谢谷歌用Gears推动信封;但在野外,唯一普遍接受的插件是Flash。幸运的是,HTML5几乎已经有了,功能几乎相同。


I need to be able to run HTML forms offline. I mean they have to work without direct connection to the web server.

In an application I wrote over 5 years ago I did it by implementing a custom protocol handler - when a user initiated form submit the resulting HTTP request was recorded locally. At later time when a connection to the server becomes available a synchronization program loops through collected requests and submits them to the server collects the responses and again saves them locally for later use.

That was then. Now another customer approached me with a very similar request. What technology do you guys think I should use today?

Support for HTML5 is very limited just yet. Google gears? Or should I go back and continue using the protocol handler and custom synchronizer?

解决方案

I'd say go for HTML5. Not all browsers support it; but all will. In the meanwhile, i think it's better to say "to get offline features try such or such browser", instead of "please download this huge plugin with lots of scary warnings".

Also a simple demographics: HTML5 is in what, 5% of all browsers? 10%? still a lot more than the 0% of users with Gears already installed.

It's a real pity, thanks a lot Google for pushing the envelope with Gears; but in the wild the only plugin generally accepted is Flash. Fortunately, HTML5 is almost there already, with nearly the same features.

这篇关于HTML表单脱机工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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