问题原文
原帖链接 · Josip Ivic · CC BY-SA 3.0
I'm building a website and they want it to be an infinite scroll single page design, and to be as SEO friendly as possible.
Just to give you an example:
Here is an example URL structure:
com
com#something
com#something1
com#something2
But here is what the URL structure would look like if it were broken down into individual pages:
com
com/something
com/something1
com/something2
So, what am I supposed to do here?
I've previously used jQuery's pushState functionality. This allows my scrolling page to be segmented into various page-like sections, which can be identified in the SERPs with a unique URL and meta data.
I'm not able to use pushState here, because this is a really big page and I need any possible analytics that I can get.
Is there any workaround?
已采纳解答
原帖链接 · GDVS · CC BY-SA 3.0
First, parallax is a visual effect. What you're asking about is a single "infinitely" scrolling page, or Single Page Application.
If I'm understanding correctly, you don't want to use pushState because you think you'll lose analytic data. I'm not sure why you think that: Google Analytics describes set-up for SPAs here.
That being said, if it's a "really big page" and SEO and analytics are critically important, I'd question whether an SPA is the best approach. Aside from the engineering problems, search engines other than Google still struggle to crawl AJAX and similar configurations. The extent to which you care about that will of course depend on search engine market share inn the market you're operating in.
Unless there's a highly compelling, make-or-break user experience argument for SPA, why go to the trouble?
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
