问题原文
原帖链接 · ardacarofficial · CC BY-SA 4.0
If you look at the example site below, when you click on any page in the menu, the content and url on the site changes, but the page is not refreshed. They probably do this feature with AJAX.
My question is, would something like this hurt SEO? The site I gave an example is not a site that already does SEO work. If it doesn't hurt SEO, I'm considering adding it to my own website. It contributes to the user experience, but I was undecided about SEO.
已采纳解答
原帖链接 · Maximillian Laumeister · CC BY-SA 4.0
This setup is generally called a "single page app" setup. If done properly, it can have no negative impact on SEO. If done improperly, in some cases it could cause your website to drop from search engine indexes completely.
It's difficult to get this type of setup working properly without an external tool or library, but there are many great choices for libraries. The Wikipedia page for Single Page Application has a lot more detail on how they work, as well as a list of common libraries used for implementing them.
If you do decide to make your website into a single page application like this, make sure it follows SEO best practices such as using simple code to make pages load as efficiently as possible to crawlers such as Googlebot, and updating the URL bar with History.pushState() whenever the user clicks a link to load new content. There's also this article from Search Engine Journal that goes into more detail about how to make sure your SPA is properly optimized for SEO.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
