[英]appcache on IE, Edge not working after closing of browser
I have a web application, which is partially offline supported. 我有一个Web应用程序,它部分脱机支持。
My appcache file looks like this: 我的appcache文件如下所示:
CACHE MANIFEST
# Datestamp 2015-10-07 GIT14a6ade78ef2ab6434871e90f7f1e70784bc1536
CACHE:
/offline/
/bundles/agrihealthahp/css/admin.css
/bundles/agrihealthahp/css/print.css
/bundles/agrihealthahp/css/offline-language-english.css
/bundles/agrihealthahp/css/offline-language-english-indicator.css
/bundles/agrihealthahp/css/offline-theme-default.css
//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css
//code.jquery.com/ui/1.11.2/themes/le-frog/jquery-ui.css
/bundles/bmatznerfoundation/css/foundation.min.css
//fonts.googleapis.com/css?family=Open+Sans+Condensed:300
/apple-touch-icon.png
/apple-touch-icon-57x57.png
/apple-touch-icon-72x72.png
/apple-touch-icon-76x76.png
/apple-touch-icon-114x114.png
/apple-touch-icon-120x120.png
/apple-touch-icon-144x144.png
/apple-touch-icon-152x152.png
/combine.c6f06a9f43e79d6d26af18e22b205cf4.js
/bundles/bmatznerfoundation/js/vendor/jquery.js
/bundles/bmatznerfoundation/js/foundation/foundation.js
/bundles/bmatznerfoundation/js/foundation/foundation.reveal.js
/bundles/agrihealthahp/js/offline-simulate-ui.min.js
//code.jquery.com/ui/1.11.2/jquery-ui.min.js
https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js
https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.4.0/moment-timezone.min.js
/bundles/agrihealthahp/images/dib-8d.png
/bundles/agrihealthahp/images/dib-9da.png
/bundles/agrihealthahp/images/dib-10d.png
/bundles/agrihealthahp/images/dib-10da.png
/bundles/agrihealthahp/images/dib-undefined.png
NETWORK:
*
FALLBACK:
/ /fallback.html
Everything works on Chrome including being able to close the browser and then open it again with www.domain.com/anything when offline, which will go back to the fallback url. 一切都适用于Chrome,包括能够关闭浏览器,然后在离线时使用www.domain.com/anything再次打开它,这将返回到后备网址。 Also, I can access /offline/ and work with the application.
此外,我可以访问/离线/并使用该应用程序。
Closing browser and reopening doesn't work with Firefox, IE11 and Edge browsers. 关闭浏览器并重新打开不适用于Firefox,IE11和Edge浏览器。
Is this a bug in my setup or supposed to work? 这是我的设置中的错误还是应该有效?
A few things to check: 要检查的一些事项:
Make sure you have the extension .appcache
and define it in your html like this: 确保你有扩展名
.appcache
并在你的html中定义它,如下所示:
<!DOCTYPE html> <html lang="en" manifest="/offline.appcache"> </html>
According to http://html5doctor.com/go-offline-with-application-cache/ .appcache
is the standard. 根据http://html5doctor.com/go-offline-with-application-cache/
.appcache
是标准。
Confirm that when you access the appcache file through chrome debugger that it has the mime type text/cache-manifest
- if it doesnt then you need to make sure your web server handles the .appcache
mimetype, in apache it is done with this line in your config file: 确认当您通过chrome调试器访问appcache文件时它具有mime类型
text/cache-manifest
- 如果它没有,那么您需要确保您的Web服务器处理.appcache
mimetype,在apache中完成此行你的配置文件:
AddType text/cache-manifest .appcache
I dont know if the shorthand // works in a manifest file (I was unable to find evidence that its supported), try supplying https:// for the external urls. 我不知道速记//是否在清单文件中工作(我无法找到支持的证据),请尝试为外部网址提供https://。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.