问题原文
原帖链接 · Rajesh Magar · CC BY-SA 3.0
I came across a site which serves multiple articles with single click using infinite scrolling.
I see page URL is updating as we reach to the bottom of 1st article and so on.
I am curious to know how it works. What is the procedure to implement it? What pros and cons it may have in terms of reporting and SEO.
社区高分解答
原帖链接 · L Martin · CC BY-SA 3.0
From a technical standpoint
This page has broken down its content into different pages and uses the history.pushstate JavaScript function to change the URL as the user loads more content.
For a user: This is all one page of content that can be smoothly scrolled through. Once a 'floor' is hit, it dynamically loads in the next 'page'.
For a crawler or browser: This is seen as several pages in a paginated directory structure (eg. /category?page=2, /category?page=3).
It's important to use Use 'rel=next|prev' link headers to indicate pagination and allow Google to crawl this structure seamlessly. Google also has a blog post about optimising infinite scrolling.
There are guides on how to effectively implement this page structure and scripting.
How is this treated from an SEO perspective?
Like any other piece of paginated content. The initial page is given precedence and following pages are treated as subsidiaries.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
