简体   繁体   English

iOS Web应用程序始终在启动屏幕上启动

[英]IOS web app always launches with splash screen

I have a web page that loads as an IOS web app and also loads a splash screen when first loading. 我有一个网页,它可以作为IOS Web应用程序加载,也可以在首次加载时加载启动屏幕。 But now it seems to show the splash screen even when the the web app is running in the background of and ios device. 但是现在,即使Web应用程序在ios和iOS设备的后台运行,它似乎仍显示启动屏幕。 I need to enable multitasking so my web app will only show the splash screen at its first launch. 我需要启用多任务处理,因此我的Web应用程序将仅在首次启动时显示启动屏幕。

How do i got about doing this? 我如何做到这一点?

The web app will always restart everytime you open it. 每次您打开该网络应用程序时,它将始终重新启动。 To enable multitasking you can persist the state of the app in the LocalStorage and restore the state upon restart. 要启用多任务,您可以将应用程序的状态保留在LocalStorage中,并在重新启动后恢复状态。

For more info see similar questions: 有关更多信息,请参见类似的问题:
Stop native web app from reloading itself upon opening on iOS 在iOS上打开后,停止本地Web应用重新加载自身
Stop reloading of web app launched from iPhone Home Screen 停止重新加载从iPhone主屏幕启动的Web应用程序

There is also an article in Safari Developer Library: Safari开发人员库中还有一篇文章:
Safari Client-Side Storage and Offline Applications Programming Guide Safari客户端存储和脱机应用程序编程指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM