Html路径完整路径和当前路径之间的区别?
我一直在阅读有关 SEO 的内容,听说路径应包含完整的 URL:http://www.etc
这是否也适用于图像源和视频内容? 或者,如果我的页面上的视频是通过“/images/ex.mov”加载的,会有什么不同吗? 这是否会影响加载时间?
I've been reading up on SEO and heard that paths should include full URLs: http://www.etc
Does this apply for image sources and video content as well?
Or does it make a difference if say a video on my page is loaded via "/images/ex.mov"
Does this affect load time at all either way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
无论您使用完整还是相对,Seo 并不重要,只要它们指向正确的目的地即可。
它影响加载时间的唯一方式是用户必须下载绝对 url 作为额外字符提供的字节。
Seo doesnt matter if you use full or relative, as long as they point to the correct destination
The only way it affects load times would be that the user has to download the bytes that the absolute url provides as extra characters.
这取决于您想要绝对路径还是相对路径。
从其他站点加载文件(例如图像)时,应使用完整的绝对 URL(包括 http://)。
例子:
您想要加载文件 http://www.example.com/images/img1.gif 来自 http://www.example.com/page.html,您可以使用路径“/images/img1.gif”。
但是,如果您想加载 http://www.etc.com/images/img1.gif 来自 http://www.example.com/page.html,您必须指定完整网址 ("http://www.etc.com/images/img1.gif ”)。
It depends whether you want an absolute path or relative path.
When loading files(such as images) from another site, you should use full, absolute urls (including http://).
Example:
You want to load file http://www.example.com/images/img1.gif from http://www.example.com/page.html, you could use the path "/images/img1.gif".
however, if you want to load http://www.etc.com/images/img1.gif from http://www.example.com/page.html, you have to specify full url ("http://www.etc.com/images/img1.gif").