简体   繁体   English

网站崩溃/未在iPhone 5s的iOS 9上加载

[英]Website crashing / not loading on iOS 9 on iPhone 5s

I'm tearing my hair out at this one. 我要把这根头发撕掉。

On my iPhone 5s running iOS 7.1.1 everything regarding my web page is fine: 在运行iOS 7.1.1的iPhone 5s上,有关我的网页的所有信息都很好:

WEBSITE LINK REMOVED FOR SECURITY PURPOSES. 出于安全目的删除了网站链接。

However, on iPhone 5s running iOS 9 I get the following error, that completely destroys / does not load the page, making it completely unusable: 但是,在运行iOS 9的iPhone 5s上,出现以下错误,该错误完全破坏了/无法加载页面,从而使其完全无法使用:

"A problem occurred with this web page so it was reloaded"

I have searched high and low for ideas about this one but there appears to be no real direct cause. 我在高空搜寻有关此问题的想法,但似乎没有真正的直接原因。

One thing I noticed in my trial and error testing, is that if I remove the main app.min.css stylesheet, it will at the least load the page (DOM). 我在试错测试中注意到的一件事是,如果删除主app.min.css样式表,它将至少加载页面(DOM)。

However, if I then load the CSS but this time with an empty file...the error appears. 但是,如果我随后加载CSS但这次使用的是空文件,则会出现错误。 So it appears that it's not related to my CSS per se - just to the act of linking to it. 因此,它似乎与我的CSS本身无关,仅与链接到它的行为无关。

I've gone through and tried removing all scripts, images etc...with no luck. 我经历了尝试删除所有脚本,图像等...没有运气。 Removing the CSS is about as close as I have gotten to solving the issue, but even with a blank CSS file, the problem occurs. 删除CSS与解决问题的过程差不多,但是即使使用空白CSS文件,也会出现问题。 It makes no sense to me. 对我来说完全是无稽之谈。

So to summarise what I know: 所以总结一下我所知道的:

  1. This appears to be triggered by the inclusion of my app.min.css stylesheet. 这似乎是由于包含我的app.min.css样式表而触发的。
  2. Even if the CSS is included as a totally blank file, the error still happens. 即使CSS作为一个完全空白的文件包含在内,该错误仍然会发生。
  3. Removing all JS does not solve the issue. 删除所有JS不能解决问题。
  4. It happens on any page, not just the landing page or any particular area. 它发生在任何页面上,而不仅仅是登录页面或任何特定区域。 Works fine on my older version of iOS but not the newer 9+ on iPhone 5s 在我的旧版iOS上运行良好,但在iPhone 5s上的新版9+上运行不佳

I'm hoping you can help. 希望您能提供帮助。 I would love to provide isolated code examples, but since this issue is so 'out there', I wouldn't know what to write up as a test case. 我很想提供隔离的代码示例,但是由于这个问题是如此“复杂”,所以我不知道该写什么作为测试用例。

If there's anything obvious you can notice in dev tools I'd love to know. 如果有什么明显的问题,您可以在我想知道的开发工具中注意到。 Thanks! 谢谢!

Here's a screenshot of the iOS simulator having the problem too: 这也是有问题的iOS模拟器的屏幕截图:

iPhone重新加载错误

After much debugging, I found the offending CSS that completely causes webkit browsers on iOS9 + to crash and burn (Safari and Chrome): 经过大量调试后,我发现有问题的CSS完全导致iOS9 +上的Webkit浏览器崩溃并烧毁(Safari和Chrome):

::-webkit-scrollbar-thumb:window-inactive {
    // Properties
}

Removing this line now removes the error and loads the page correctly. 现在,删除该行可消除错误并正确加载页面。

This problem was hard to debug because the iPhone heavily caches your CSS files. 这个问题很难调试,因为iPhone大量缓存了CSS文件。 To get around this, cache bust your CSS when testing by appending a random query string to the end like so (PHP): 为了解决这个问题,在测试时通过在末尾附加一个随机查询字符串(PHP)来缓存破坏CSS的方法:

<link rel="stylesheet" href="/path/to/css/file.css?refresh=<?php echo md5(rand()); ?>">

Remember to remove this once your debugging is done so that you can take advantage of caching. 记住在调试完成后将其删除,以便可以利用缓存。

Twitter post here for sharing: https://twitter.com/michaelpumo/status/669478677600669696 Twitter帖子在这里分享: https : //twitter.com/michaelpumo/status/669478677600669696

Hope this helps somebody out there. 希望这对有人有所帮助。 What a pain it was! 真是痛苦!

Seems like your website opens only on Google Chrome. 似乎您的网站仅在Google Chrome上打开。 Safari crashed. Safari崩溃了。 Opening on Mozilla Firefox shed some light. 在Mozilla Firefox上打开显示了一些信息。

I see this error on the console downloadable font: download not allowed (font-family: "Tiempos Regular" style:normal weight:normal stretch:normal src index:1): content blocked source: http://example.com/wp-content/themes/future-cities/dist/fonts/TiemposTextWeb-Regular.woff 我在控制台可downloadable font: download not allowed (font-family: "Tiempos Regular" style:normal weight:normal stretch:normal src index:1): content blocked source: http://example.com/wp-content/themes/future-cities/dist/fonts/TiemposTextWeb-Regular.woff上看到此错误downloadable font: download not allowed (font-family: "Tiempos Regular" style:normal weight:normal stretch:normal src index:1): content blocked source: http://example.com/wp-content/themes/future-cities/dist/fonts/TiemposTextWeb-Regular.woff

which is in app.min.css . app.min.css

@font-face {
    font-family: "Tiempos Regular";
    font-style: normal;
    font-weight: normal;
    src: url("../fonts/TiemposTextWeb-Regular.eot?#iefix") format("embedded-opentype"),url("../fonts/TiemposTextWeb-Regular.woff") format("woff")
}

Take that font out of css and then try it. 从CSS中取出该字体,然后尝试。 It should work. 它应该工作。

Hope it helps! 希望能帮助到你!

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

相关问题 离子ios应用程序卡在启动画面上 - 在模拟器中工作而不是在iphone 5s设备上 - ionic ios app stuck on splash screen - works in emulator not on iphone 5s device iPhone 5s - iOS 9.0.2 - safari - 在横向模式下隐藏地址栏 - iPhone 5s - iOS 9.0.2 - safari - Hide address bar when landscape mode JavaScript或PHP检测iPhone 5S - javascript or PHP detect iPhone 5S 针对纵向和横向问题定位iPhone 5和5S - Targeting iPhone 5 & 5S in portrait & landscape issue Three.js抗锯齿不适用于iPhone 5和iPhone 5s - Three.js antialiasing not working on iPhone 5 and iPhone 5s 我的iPhone 5s无法使用钛合金进行水平旋转 - My iPhone 5s is not working with horizontal rotation using Titanium Alloy 在放大文本输入字段时(仅在缩放时)在iPhone 4 / 4s(iOS 7.0.1)上崩溃Safari - Crashing Safari on iPhone 4/4s (iOS 7.0.1) when zooming in on text input field (and only when zooming) 如何在iPhone 6s和5s中隐藏键盘上方的图标和文本密码 - How to hide icon and text password above keyboard in iphone 6s and 5s 在Javascript中加载图像时,iPad / iPhone浏览器崩溃 - iPad/iPhone browser crashing when loading images in Javascript JavaScript循环if语句5s - JavaScript loop if statement by 5s
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM