Facebook iPhone 版作为 iOS 上 safari 之外的应用程序?
我不喜欢 iPhone 的网络应用程序,因为它们必须在 Safari 实例内运行,并且 Safari 工具栏位于底部。
但今天,当我在 iPhone 上打开 Facebook 的网络应用程序版本时,我睁大了眼睛!该任务在任务管理器中以自己的实例打开,并且填满整个屏幕(除了屏幕顶部的指示栏)。这是我喜欢的网络应用程序,我对其工作原理非常感兴趣!但我尝试搜索,却找不到有关此功能的任何信息。
要重建我正在谈论的 Facebook Web 应用程序:
- 访问 facebook.com 或更准确地说 http://touch iPhone 上 Safari 中的 .facebook.com/?w2m。
- 单击 Safari 底部栏中的中间按钮,然后“添加到主屏幕”
- 从主屏幕打开新的 Facebook 网络应用程序。
我以这种方式保存在主屏幕上的所有其他网络应用程序(例如不同的 Google 工具)都会在 Safari 中的新选项卡中打开。但 Facebook 在新实例中作为“独立”应用程序打开,并且没有 Safari“外壳”。
我知道可以编写文档加载脚本来向下滚动,以便“隐藏”地址栏,但这不是 Facebook 所做的!
I don't like web-apps for iPhone because they have to run inside the Safari instanace and have the Safari-toolbar at the bottom.
But today when I opened the web-app version of Facebook on my iPhone I got big eyes! This one opens in its own instance in the task manager and it fills the whole screen except the indicator bar on the top of the screen. THIS is the kind of web-app I like, and I'm really interested in how this works! But I've tried to search and I can't find any information about this feature.
To reconstruct the Facebook web-app I'm talking about:
- Go to facebook.com or more exactly http://touch.facebook.com/?w2m in Safari on iPhone.
- Click the middle button in the bottom bar in Safari and "Add to home screen"
- Open the new Facebook web-app from the home-screen.
Every other web-apps I've saved on the home screen this way (e.g. different Google tools) opens in a new tab in Safari. But Facebook opens as a "stand alone" application in a new instance and without the Safari "shell" around.
I know that it is possible to script the onload of the document to scroll down so the address-bar is "hidden", but that's not what Facebook does!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是使用特定的元标记来完成的。
其中有许多可让您设置状态栏样式、启动屏幕、主屏幕图标等。
请注意 - JavaScript 性能在此类独立 Web 应用程序中明显较差,并且您必须小心考虑用户体验没有后退按钮。
This is done using a specific meta tag.
There are a number of these that let you set the status bar style, splash screen, home screen icon, etc.
Do note - JavaScript performance is significantly worse in standalone web apps like this, and you have to be careful about the user experience considering there's no back button.