简体   繁体   English

为什么我的网站图像在交换并且页面仅在iPhone Web浏览器上挂起?

[英]Why is my website images are swapping and the page is hanging on iPhone web browsers only?

I have a website written in ASP.NET MVC (Razor). 我有一个用ASP.NET MVC(剃刀)编写的网站。 Recently, a few days ago the images on the website started swapping all over the place. 最近,几天前,网站上的图像开始在各地交换。 When refreshing the site, it might just hang for quite some time or load all images correctly. 刷新网站时,它可能会挂起一段时间或正确加载所有图像。 So I plugged my iPhone to my Mac and used the web inspector to see whats going on. 因此,我将iPhone插入Mac,然后使用网络检查器查看发生了什么。 I found out that at the time of load the browser hangs on certain files. 我发现在加载时,浏览器会挂在某些文件上。 These files are either images or js libraries. 这些文件是图像或js库。 The images are very small. 图像很小。 Less then 10kb so it is not the size of the image. 小于10kb,因此不是图像的大小。

This issue only happens on iPhones. 此问题仅在iPhone上发生。 I checked on several iPhones. 我检查了几部iPhone。

I have tried multiple Android devices, Mac and Windows computers and they all load fast and every image is in the right place - no issues. 我尝试了多种Android设备,Mac和Windows计算机,它们都可以快速加载,并且每个图像都位于正确的位置-没问题。

I researched a bit and found out some interesting references to HTTP Pipelining. 我进行了一些研究,发现了一些有趣的HTTP管道引用。 But if that was is the case, why would these issues start now? 但是,如果是这样,为什么这些问题现在就开始?

I do not know what to thing anymore. 我不知道该怎么办了。

What am I trying to understand is why would that only happen on the iPhone? 我想了解的是为什么仅在iPhone上会发生这种情况?

Thank you, Any clue would be appreciated. 谢谢,任何线索将不胜感激。

I had the same issue. 我遇到过同样的问题。 After months of breaking my head I decided to implement lazy load on all images. 经过几个月的努力,我决定对所有图像实施延迟加载。 After that, swapping never occurred. 在那之后,交换从未发生。

Page hanging could happen because of multiple reasons. 页面挂起可能由于多种原因而发生。 I would definitely check the code again and in particular look for the way you handled unmanaged resources. 我肯定会再次检查代码,尤其是寻找处理非托管资源的方式。 More on unmanaged resources 有关非托管资源的更多信息

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

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