会延迟加载img src对SEO产生负面影响 [英] would lazy-loading img src negatively impact SEO

查看:179
本文介绍了会延迟加载img src对SEO产生负面影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一家购物网站上工作.我们在结果中显示40张图像.我们希望减少页面的加载时间,并且由于图像阻止了onload事件,因此我考虑通过首先设置img.src ="然后在onload之后设置它们来延迟加载它们.请注意,这不是HTML片段的Ajax加载.图像html和alt文本一起出现.只是src的图像被延迟了.

I'm working on a shopping site. We display 40 images in our results. We're looking to reduce the onload time of our page, and since images block the onload event, I'm considering lazy loading them by initially setting img.src="" and then setting them after onload. Note that this is not ajax loading of html fragments. the image html along with the alt text is present. it's just the image src is deferred.

有人正在衡量站点速度吗?是否有人知道这是否会损害SEO或导致Google罚款?

Does anyone have any idea as to whether this may harm SEO or lead to a google penalty box now that they are measuring sitespeed?

推荐答案

图像不会阻止任何内容,它们已经被延迟加载. onload事件会通知您所有内容都已下载,包括图像,但是已经准备好了很长时间.

Images don't block anything, they are already lazy loaded. The onload event notifies you that all of the content has been downloaded, including images, but that is long after the document is ready.

可能可能会因为关键字丢失和src属性为空而损害您的排名.您可能会损失得不偿失-最好以其他方式(包括图像)来优化页面. Gzip +较少的请求+适当的到期时间+快速的静态服务器应该可以走很长一段路.还有一个免费CDN 可能会让您感兴趣.

It might hurt your rank because of the lost keywords and empty src attributes. You'll probably lose more than you gain - you're better off optimizing your page in other ways, including your images. Gzip + fewer requests + proper expires + a fast static server should go a long way. There is also a free CDN that might interest you.

我确定google并不意味着整个网络都将其图像从源代码中删除以获取一些要点.并且请记住,他们认为3秒以下的任何东西都是很好的加载时间,在诉诸伏都教技术之前,还有很大的回旋余地.

I'm sure google doesn't mean for the whole web to remove their images from source code to gain a few points. And keep in mind that they consider anything under 3s to be good loading times, there's plenty of room to wiggle before resorting to voodoo techniques.

这篇关于会延迟加载img src对SEO产生负面影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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