大网数据广告活动
网站运营与故障问答

Workaround for appearing to change the URL of an infinite scrolling page when pushState is not available due to analytics

· 52CE 我爱测

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#somet…

问题原文

原帖链接 · 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?

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-21)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。