延迟加载使页面在IE上冻结/加载非常慢? [英] Lazy load making pages freeze/load very slow on IE?

查看:84
本文介绍了延迟加载使页面在IE上冻结/加载非常慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个Drupal站点上工作,该站点已实现了懒惰加载,因为它的映像非常重.该功能适用​​于除IE之外的所有浏览器,由于长期运行的脚本",该页面在向下滚动以查看图像时会定期冻结.

I'm working on a Drupal site that had lazy load implemented into it because it is very image heavy. The feature works on every browser but IE, in which the page periodically freezes when scrolling down to see images due to a "long running script".

这似乎是一个已知问题,但是我似乎找不到针对该问题的最终解决方案.有谁知道是否有已知的解决方法,或者这仍然是个案解决方案?

It seems like this is something of a known issue, but I can't seem to find a conclusive fix for the problem. Does anyone know if there is a known-workaround, or is this still a case-by-case fix?

推荐答案

如果您还需要 IE8 支持,建议您使用

If you also need IE8 support, I suggest you to use justlazy, which is very lightweight and doesn't use jQuery.

它非常易于使用:

1.定义您选择的占位符

<span data-src="default/image" data-alt="some alt text"
      class="justlazy-placeholder">
</span>

2.注册占位符的延迟加载

Justlazy.registerLazyLoadByClass("justlazy-placeholder");

有一些可用的选项,由于使用img作为占位符,因此您可以SEO优化占位符.

There are some options available and you can SEO optimize your placeholder due to use an img as placeholder.

这篇关于延迟加载使页面在IE上冻结/加载非常慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆