AMZ123跨境卖家导航
拖动LOGO到书签栏,立即收藏AMZ123
首页跨境头条文章详情

JavaScript SEO怎么做

1715
2020-08-06 18:10
2020-08-06 18:10
1715

Hi. I’m Charles from Cross Border Digital. Are you using JavaScript to build your website? Or maybe you're thinking about using one of the modern JavaScript frameworks like Ember,or Node, or React, or Angular. Great frameworks for building very app-like interfaces on the web.

大家好,我是来自Cross Border Digital的Charles. 你是否在用JavaScript建站?或者你正在考虑用使用当前比较流行的JavaScript框架:Ember、Node、React 或者是Angular建站。这些都是非常优秀的框架,给网站访客提供类似App的操作体验。


But there are some specific challenges to using these JavaScript frameworks when it comes to SEO. Today, I want to share some insights and advice to help you use these frameworks in a way that will work with Google and ensure that you can rank your website.

但是,当涉及到SEO时,使用这些JavaScript框架存在一些特定的挑战。今天,我想分享一些见解和建议,以帮助您以与Google兼容的方式使用这些框架,确保网站在搜索引擎可以获得排名。


So when it comes to understanding the implications of using JavaScript to build your website, there's really two key things that we need to talk about.

因此,在理解使用JavaScript开发网站的意味着什么时,实际上需要讨论两个关键问题。


The first is how Google actually works, how they treat JavaScript, how they understand JavaScript.

首先是Google的实际工作方式,如何对待JavaScript,如何理解JavaScript。


And the second is understanding the difference between client-side and server-side rendering of the content and HTML on your website.

其次是了解网站上内容和HTML在客户端和服务器端渲染的区别。


These two things together if we can understand these, then we can understand how Google is going to interpret our JavaScript-powered website.

如果我们能理解这两点,那么就能了解Google如何读取JavaScript网站。


OK, so let's first talk about Google. There are in fact two parts to Google's crawling and indexing of the web.

首先来讨论一下谷歌运作方式。谷歌爬取收录网站可以分为两部分:


The first part, the crawler known as Google bot is the part of the infrastructure that follows every link it can find on the web to uncover every URL on your website and on every other website on the web. The Google bot crawler can't render JavaScript. It's simply visits a page. It will do a very quick pass of any HTML that it finds on the page to see if there are any other links it can follow, but otherwise, it simply passes the URLs that it does find back to the indexer.

第一部分,被称为Googlebot的爬虫,是搜索引擎基础结构的一部分,它通过页面上的链接,去发现更多的页面。Google bot爬虫无法渲染JavaScript。它只是访问页面。爬虫会快速查找HTML页面上的链接,继续抓取新的页面,没有新页面就会将爬取到的链接返回谷歌索引(indexer)。

 

The indexer is the part of Google's infrastructure that completely renders a page of all the content, all of the CSS, all of the layout to try in the content, to try and understand what that page is about. So that when someone does a query, it can return that page if it is relevant. Now the indexer can render JavaScript.

索引是Google搜索引擎基础结构的一部分,它负责渲染页面的所有内容,CSS,布局以了解该页面的核心信息。当用户在搜索引擎搜索时,才能返回客户搜索相关的页面。Indexer可以渲染JavaScript。


So it is true to say that Google can render JavaScript-powered web pages.

因此,谷歌支持渲染基于JavaScript开发的网页。

 

But to completely understand the implications of using JavaScript, it is also important to understand the difference between client-side and server-side rendering of JavaScript, because that makes a big difference to the way that Google will interpret your website.

但是要完全了解使用JavaScript对网站的影响,理解客户端和服务器端JavaScript渲染的区别也很重要,因为会导致Google读取网站的方式有很大的不同。


So generally speaking, these modern JavaScript frameworks like React, Node, and Ember, and Angular, they render in the client side. That means that when someone visits your web page that's built on one of these frameworks, the JavaScript application is delivered to the browser and then it renders everything in the browser. It calls the CSS, it calls the content, it calls the images, and any other resources required to lay out your web page into the browser and renders them on the client side.

因此,一般而言,这些现代JavaScript框架(例如React,Node和Ember和Angular)在客户端渲染。这意味着,当用户访问基于这些框架之一开发的网页时,JavaScript应用程序将交付给浏览器,然后在浏览器渲染所有内容。将CSS,文本,图片以及其他与页面展示有关的资源推送到浏览器,在客户端渲染。


A server side rendering is when all of that work is done on the server and the HTML of the complete page and all of the content is delivered to the browser.

服务器端渲染是指在服务器端完成所有渲染工作并将完整页面的HTML和所有内容都交付给浏览器。

 

Now this has big implications for Google because as we said, the Google bot can't render JavaScript. So that means that when Google bot visits your home page or your JavaScript-powered website, if you're rendering client side, it means that the Google bot will get that JavaScript application, but it can't render any content or any link. So it won't find any other links to crawl. It will have to send that single URL back to the indexer. The indexer will then render that page it will find any links and content on that page. It will send any links back to the crawler so that they can then continue to follow those you URLs to see if they can find any other links.

这就对Google收录网站产生了重大影响,因为前面所说,Google bot无法渲染JavaScript。因此,这意味着当Googlebot访问您的主页或基于JavaScript的网站时,如果网站是客户端渲染,则意味着Googlebot将获取该JavaScript应用程序,但无法渲染任何内容或任何链接。因此Google bot无法找到页面上的链接。只会返回一个URL给谷歌indexer。谷歌Indexer将渲染页面并发现页面上的更多链接和内容。发现新的链接则会返回给Google bot去继续抓取进一步发现更多的链接。


And in this way, it really slows down the process of crawling your website in a very big way.
And this is particularly relevant for large websites. So the other thing that I have to say about client-side rendering is that Google's indexer uses a version of Chrome for rendering JavaScript-powered websites that is about three years old.

这就极大地减慢了网站被谷歌抓取的速度,这对于大型网站影响尤为重大。另外,关于客户端渲染,Google的indexer用来来渲染JavaScript网站所使用的Chrome版本已有大约三年的历史。

 

And that means that it can't support all the latest features of these modern JavaScript frameworks. So if you're building a JavaScript-powered website that renders on the client side, it is very important that you ensure that it is set up in such a way that it degrades nicely for older versions of browsers so that Google can render your content and your HTML completely.

这意味着它不能支持那些现代JavaScript框架的所有最新功能。因此,如果您要构建一个以JavaScript为基础的网站,并在客户端进行渲染,那么确保Google可以完全渲染您的内容和HTML。


I've seen many cases where a client-side rendered JavaScript page, Google is able to crawl or index part of it but it doesn't see all of the continent because of some of the features that have been included in that page. So very important that your JavaScript-powered web page degrades nicely for all the versions of the browser.

我看过很多客户端渲染的JavaScript页面,Google能够对其进行抓取和编制索引,但是页面中包含的某些功能谷歌无法完整抓取。因此要确保你基于JavaScript开发网页对于所有版本的浏览器都可以很好地渲染。

 

So we know that Google bot can't render JavaScript. And whilst the Google indexer can render JavaScript, we also know that it is limited to older versions of Chrome. So it doesn't support all the latest features of these modern JavaScript frameworks. So if we are doing client-side rendering, it is more difficult to get all of our content indexed and it really does slow down the entire process of crawling and indexing your website, which includes any changes you make. So if you make changes to your website, particularly if you have a large website, it can take weeks or months for those changes to be reflected in the Google index.

我们知道Google bot无法渲染JavaScript。Google indexer可以呈现JavaScript,但我们也知道它仅限于旧版Chrome。因此,它不支持这些现代JavaScript框架的所有最新功能。因此,如果在进行客户端渲染,则很难对所有的内容建立索引,这确实会减慢对网站被抓取和索引的整个过程,其中包括您所做的任何更改。因此,如果您对网站进行更改,尤其大型网站,则这些更改可能需要数周或数月才能反映在Google索引中。

 

So what to do? Well, our strong recommendation is to use old-fashioned content management systems for public facing web sites, first and foremost. If you haven't yet started the build of your website, then we would strongly recommend you look at one of the content management systems like Ambraco, or Wordpress, or Drupal. Or if you're doing e-commerce, use one of the platforms like Shopify, or BigCommerce.

那么该怎么办?我们强烈建议普通网站使用老式的内容管理系统。如果您还没有开始网站的搭建,那么我们强烈建议您考虑内容管理系统,例如Ambraco,Wordpress或Drupal。如果是电商网站,可以考虑用Shopify, BigCommerce电商建站系统。

 

These content management applications render everything on the server side and deliver the complete HTML to the browser and to Google, which makes it much easier and faster for Google to completely crawl and index your website.

这些内容管理应用程序在服务器端呈现所有内容,并向浏览器和Google提供完整的HTML,这使Google能够更轻松,更快地完全抓取您的网站并为其建立索引。

 

If you have already built a JavaScript-powered website, or if you really want to for whatever reason, then our drawing recommendation is to configure that application to render everything on the server side and deliver the complete HTML and content to the browser and to Google in the same way that one of these older traditional content management systems does. If you can do that properly, then it will make it a lot easier and faster for Google to index your JavaScript-powered website.

如果您已经建立了JavaScript网站,或者出于特殊原因确实想要这样做,那么我们的建议是配置该应用程序在服务器端渲染所有内容,并将完整的HTML和内容提供给浏览器和Google 就像这些较旧的传统内容管理系统之一一样。这对于谷歌快速抓取收录你的JavaScript网站会有很大帮助。

 

Perhaps, you've already launched a JavaScript-powered website that is rendering everything on the client side. You're not sure how to configure it to do that on the server side. There are third party services like Prerender.io, which might help. They might be worth looking at as well.

又或许,您已经发布了一个在客户端渲染的基于JavaScript开发的网站,不知道如何改为在服务器端渲染。有一些第三方服务获取可以帮你解决这个问题,比如Prerender.io。可以了解一下。

 

So in a nutshell, a lot of SEO is about making it easy for Google and not putting hurdles in Google's way. And when it comes to using JavaScript on your website, there are quite a few pitfalls and traps that if you're not aware of them, it's easy to fall into.

简而言之,很多SEO都是为了帮助Google而不是阻碍Google抓取网站。在您的网站上使用JavaScript时,会有很多陷阱,稍不小心就掉入。


免责声明
本文链接:
本文经作者许可发布在AMZ123跨境头条,如有疑问,请联系客服。
最新热门报告作者标签
俄罗斯电商市场快速增长,综合平台优势大于独立站
AMZ123获悉,近日,Euromonitor、EMARKETER及Yakov and Partners发布了《俄罗斯电商市场发展现状》报告。报告基于2020-2024年的数据,对俄罗斯电商市场的发展趋势、综合电商平台与独立电商的竞争格局、各品类表现、未来市场预测进行了系统分析。一、俄罗斯电商趋势1.互联网渗透率增长放缓2020至2024年,俄罗斯互联网使用率从78.1%(约9560万用户)提升至85.5%(约1.04亿用户),四年间增加7.4%(新增约790万用户)。俄罗斯的互联网渗透率增速正在逐年放缓,预计到2029年互联网渗透率将达到89%(约1.08亿用户)。
越南加强进口商品监管,修订多项增值税和海关规则
AMZ123获悉,近日,越南海关公布了2026年对增值税(VAT)、特别消费税(SCT)及电子交易管理的多项修订,核心在于统一税制规则、扩大免税范围并加强跨境与电子化申报管理。此次调整既有减轻企业合规成本、扶持出口与产业链升级的内容,也伴随对部分消费品与临时进口再出口环节的更严监管,直接影响生产、进出口和跨境电商卖家。在增值税方面,新法律将此前零散的官方函件并入法律和配套法令,提升透明度并便于电子化处理。关键变化包括扩大增值税免税目录:列入政府清单的自然资源与矿产(无论原料还是加工品)在出口时被明确归为增值税免税项目。
TikTok Shop黑五复盘,一堆中国卖家晒出百万GMV
黑五复盘,TikTok卖家:“库存差点给我爆完了!”
存生命危险!美国CPSC紧急召回超1万件儿童手写板玩具
AMZ123获悉,近日,美国消费品安全委员会(CPSC)宣布,紧急召回亚马逊在售的KTEBO品牌的儿童书写板玩具,原因是该产品未能符合玩具类产品的强制性安全标准,电池仓固定螺丝无法保持牢固,可能导致纽扣电池外露。若儿童误吞纽扣电池,可能造成严重伤害、内部化学灼伤,甚至威胁生命。此次召回涉及KTEBO品牌的双件套书写平板玩具,召回数量约10,380件,产品提供四种颜色组合,包括粉色/蓝色、绿色/黄色、橙色/蓝色以及紫色/红色,并有8.5英寸与10英寸两种规格,每套配有与机身同色的手写笔。
AliExpress波兰11月增长显著,双十一活动日活用户增长37%
AMZ123获悉,近日,AliExpress的数据显示,平台11月的消费者参与度与卖家销售额大幅增长。今年11月11日至19日举行的AliExpress双十一购物节活动期间,波兰用户的参与度显著提升,日活跃用户数量同比增长37%。随着去年秋季AliExpress开放波兰本地卖家入驻,今年波兰本地卖家的参与度也明显提高,他们在此次双十一促销期间的GMV同比增长74%。从消费偏好来看,智能生活类产品持续吸引波兰消费者,智能家居与清洁设备成为销售榜单的主导品类。Dreame、ILIFE、Laresar等品牌的扫地机器人和自动吸尘设备进入最畅销产品行列,反映波兰家庭对智能化、便捷化生活方式的需求不断上升。
亚马逊印度计划投资127亿美元,推动本地云和AI基础设施建设
AMZ123获悉,近日,亚马逊宣布,将在2030年前进一步推动人工智能在印度的普及,计划投入127亿美元建设本地云和AI基础设施。亚马逊表示,这项长期投资将为超过1500万家中小企业带来AI应用能力,同时在2030年前为400万名公立学校学生提供AI素养课程与职业教育,提高数字技能普及度。亚马逊认为,AI正成为提升印度数字包容性的关键力量,能够突破语言、读写能力与访问渠道的限制,让更多个人与企业受益。在中小企业领域,亚马逊正在推出新一代AI工具,以降低经营门槛、简化业务操作并提升增长效率。
“黑五网一”DTC投放数据复盘,流量都去哪了?
2025 年“黑五网一”大战,终于落下帷幕。除了 GMV ,这场仗花了多少“弹药”,你算清楚了吗?流量场上的每一发子弹,都正中靶心了吗?偏离的原因找到了吗?除了看自己后台的数据,还要看清整个大盘的趋势——这决定了我们下一步该往哪儿走。基于 GoodsFox 监控的投放数据,我们有以下发现:服装、美妆的竞争力度只增不减3D 打印与机械键盘,从“小众圈层”跃升为热门赛道宠物经济的流量稳定,不靠爆点也能撑起大盘这些变化背后,都在重塑今年“黑五网一”的投放结构,我们先从流量基本盘讲起——尽管每年都有新风口,但从广告投放的绝对体量来看,传统大盘仍在支撑整体流量水位。
还在“索评”?亚马逊Review管理的红线与出路
亚马逊的评论管理格局是如何改变的?首先要明确一点:过去几年,亚马逊的Review生态系统发生了剧变,这对各类管理工具产生了深远影响。在买家端,那些专门用来标记“虚假评论”(或帮助买家鉴别真伪)的老一代工具正在失效甚至消失。不少买家就因为Fakespot在平台冲突、合规问题和数据接口变更的压力下关停而感到措手不及。Fakespot是一个分析电商产品评论真实性、帮助消费者识别虚假评价的平台。在卖家端,亚马逊的政策合规和风控机制变得更加严厉。这意味着Review的风险红线变了:以前那些“地毯式索评”或“送测(Giveaway)”的套路可能有效,但现在操作这些手段的封号风险极高。
AMZ123PayPal计算器使用指南及常见问题详解(内附计算公式)
Paypal手续费计算器介绍及计算公式分享 https://www.amz123.com/tools-paypal
重磅!亚马逊公布2026年战略重心变化
AMZ123获悉,12月4日,2025年亚马逊全球开店跨境峰会上,亚马逊回顾了过去一年里中国卖家在亚马逊上所取得的进展,并围绕2026年四大业务战略重点——供应链服务、AI赋能、全球拓展布局、本地服务,揭晓了40余项创新举措。根据亚马逊披露的数据:2025年以来,中国卖家通过亚马逊全球站点售出数十亿件商品,在美欧等成熟站点的销售额增长超过15%,在新兴站点的销售额增长超过30%;2025年以来,销售额达到200万、500万、800万美金的中国卖家数量,增长均超过20%;销售额超过1000万美金的中国卖家数量,增幅近30%。
亚马逊新功能,能救你一整条链接!
最近有卖家后台发现,亚马逊多了一个新功能,看起来不起眼,实则很关键——绩效提醒(Performance Notifications)。这个功能解决了我们运营过程中的一个老大难:链接出问题时能不能第一时间被提醒?以前我们发现Listing出状况,大多靠“事后诸葛”:出单突然断了,去查是不是被下架;关键词排名一夜暴跌,才想起去对比转化率;广告Acos拉爆、CTR异常,才知道图可能挂了;等你发现问题,可能已经晚了。这次,亚马逊终于“良心发现”,开始主动提醒你链接的数据异常了。这个新功能到底能干啥?说白了,它就是一个链接级别的数据异常预警系统。
宠物消费持续升温,亚马逊10款月销过万宠物产品推荐
AMZ123获悉,近日,亚马逊各类产品搜索量增长显著,以下10款产品在亚马逊上销量表现突出,深受消费者欢迎。1. 猫咪情绪舒缓喷雾预计销售额:139.84万美元/月销量:26,000+星级评分:4.4好评数量:12,694+图源:亚马逊产品描述:FELIWAY Optimum猫咪情绪舒缓喷雾的专利信息素复合物能显著减少猫咪的应激表现,包括喷尿、抓挠、恐惧反应、紧张冲突等。产品无药性、安全且不干扰人类与其他宠物,每个喷雾覆盖面积约 700 平方英尺。
“月薪3W”的运营因工作敷衍被辞,一线运营应具备哪些综合素质和竞争力?
匿名用户我的C位上个月公司招的一个运营离职了面试的的时候表现非常好据他所说,他上一份工作的综合薪资在3W左右面试的时候他的想法也是有的,所以我也给的比相对比较高的底薪。
跨界AI失败?深圳大卖资产重组终止!
12月2日,跨境3C 配件大卖杰美特发布公告,宣布决定终止筹划以现金方式收购AI 算力解决方案提供商思腾合力(天津)科技有限公司(以下简称“思腾合力”)控制权的重大资产重组事项。这场筹划半年、备受行业关注的跨界收购突然落幕,消息一出引发市场热议。AMZ123获悉,杰美特于2025年6月21日首次披露了筹划重组的提示性公告,拟通过现金交易控股思腾合力,该交易初步测算构成重大资产重组,且不涉及发行股份、不构成关联交易,也不会导致公司控制权变更。杰美特是“中国手机壳第一股”,主营业务为移动智能终端保护类产品的研发、设计与销售,产品包括手机、平板及穿戴设备的保护壳与表带等。
还在“索评”?亚马逊Review管理的红线与出路
亚马逊的评论管理格局是如何改变的?首先要明确一点:过去几年,亚马逊的Review生态系统发生了剧变,这对各类管理工具产生了深远影响。在买家端,那些专门用来标记“虚假评论”(或帮助买家鉴别真伪)的老一代工具正在失效甚至消失。不少买家就因为Fakespot在平台冲突、合规问题和数据接口变更的压力下关停而感到措手不及。Fakespot是一个分析电商产品评论真实性、帮助消费者识别虚假评价的平台。在卖家端,亚马逊的政策合规和风控机制变得更加严厉。这意味着Review的风险红线变了:以前那些“地毯式索评”或“送测(Giveaway)”的套路可能有效,但现在操作这些手段的封号风险极高。
AMZ123星球专享丨12月第一周资讯汇总
亚马逊亚马逊的AI购物助手Rufus已新增识别虚假折扣的功能。用户可以查询商品在过去30天内的价格走势,系统将显示当前价格、促销价及历史折扣时段,并提供价格曲线图以辅助决策。市场研究机构Wells Fargo估算,亚马逊在美国服装市场的影响力持续扩大。亚马逊服装与鞋类品类在2024年销售额超过670亿美元,占据近13%的市场份额;预计在2025年销售额将超过720亿美元。亚马逊宣布,自12月15日起,对欧洲市场卖家收费进行大幅调整,重点下调服装与配饰等低价商品的推荐费,并在2026年继续对多个类别下调推荐费与履约费,以应对来自Shein、Temu等低价平台的竞争。
《亚马逊生活日用品类攻略手册》PDF下载
作为日常生活不可或缺的重要组成,生活百货品类覆盖范围广泛,包括家居用品、家具、车用配件、户外装备、园艺 工具、运动器材、家装用品、厨房、玩具以及宠物用品等众多领域。这类产品不仅是满足基本生活所需,更体现了人们对美好生活的向往和追求。
《掘金泰国-市场洞察与战略机遇报告2025》PDF下载
随着全球经济一体化的加速,泰国作为东盟的核心枢纽,凭借其独特的地缘优势庞大的消费市场以及持续优化的营商环境,成为众多企业战略布局的重要目标。本报告深入剖析泰国市场的政策红利、消费趋势、产业机遇以及合规挑战,旨在为有志于开拓泰国市场的中国企业提供行动指南,助力企业在东盟这片充满活力的土地上把握机遇、应对挑战、!实现可持续发展。
《2025欧美假日购物季营销指南》PDF下载
2025年美国假日购物季零售额预计同比仅增长1.2%,总销售额约1.359万亿美元,虽仍保持正增长,但为2009年以来最低增速,市场正在步入低增长的新常态。
《2025年跨境电商东南亚市场进入战略白皮书》PDF下载
东南亚电商,正以惊人的速度复刻中国电商高速增长的黄金时代。2024年东南亚电商GMV达到1284亿美元,短短5年涨幅超过3倍。全球电商2024年GMV增幅最快的十大市场中,东南亚独占四席。东南亚是拥有约6.7亿人口的广阔市场,在现今全球关税的不确定性大格局下,因其电商基建完善,利好的贸易政策,和更高的年轻人口占比,成为跨境卖家生意拓张焦点之一。
《2025年TikTok Shop玩具品类行业报告(欧美站)》PDF下载
分析TikTok Shop美国市场、英国市场、西班牙市场、墨西哥市场等主流市场点短视频及直播电商数据,选取TikTok与玩具爱好品类相关的内容进行分析报告。
《2025 洗护品类趋势与创新洞察》PDF下载
本报告独特价值:将消费者的“行为结果”据),揭示消费者深层心理动机、并能精准预判未来增长机会
《亚马逊双轨增长指南》PDF下载
亚马逊以“以客户为中心”为核心理念,通过整合B2B与B2C的全渠道服务,帮助卖家实现“一店双拓”-- 一次上架,同步触达个人消费者与企业买家,获得双重收益。同时,基于Direct to Buyer(直接触达买家)的模式,更能有效减少中间环节,提升利润空间与品牌掌控力。
《亚马逊全球线上商采趋势与区域洞察》PDF下载
随着全球企业数字化转型的深入推进,B2B商采有望成为下一个万亿级别的蓝海市场然而,中国卖家在开拓海外企业商采市场时往往面临着一个关键挑战:难以准确把握海外企业买家的商采行为和决策模式。这种认知偏差不仅影响了产品开发方向,也制约了市场拓展策略的制定。
亚马逊资讯
AMZ123旗下亚马逊资讯发布平台,专注亚马逊全球热点事件,为广大卖家提供亚马逊最新动态、最热新闻。
亚马逊公告
AMZ123旗下亚马逊公告发布平台,实时更新亚马逊最新公告,致力打造最及时和有态度的亚马逊公告栏目!
跨境数据中心
聚合海量跨境数据,输出跨境研究智慧。
AMZ123会员
「AMZ123会员」为出海者推出的一站式私享服务
侃侃跨境那些事儿
不侃废话,挣钱要紧!
跨境学院
跨境电商大小事,尽在跨境学院。
AMZ123选品观察员
选品推荐及选品技巧分享。
亿邦动力网
消除一切电商知识鸿沟,每日发布独家重磅新闻。
首页
跨境头条
文章详情
JavaScript SEO怎么做
CrossBorder
2020-08-06 18:10
1714

Hi. I’m Charles from Cross Border Digital. Are you using JavaScript to build your website? Or maybe you're thinking about using one of the modern JavaScript frameworks like Ember,or Node, or React, or Angular. Great frameworks for building very app-like interfaces on the web.

大家好,我是来自Cross Border Digital的Charles. 你是否在用JavaScript建站?或者你正在考虑用使用当前比较流行的JavaScript框架:Ember、Node、React 或者是Angular建站。这些都是非常优秀的框架,给网站访客提供类似App的操作体验。


But there are some specific challenges to using these JavaScript frameworks when it comes to SEO. Today, I want to share some insights and advice to help you use these frameworks in a way that will work with Google and ensure that you can rank your website.

但是,当涉及到SEO时,使用这些JavaScript框架存在一些特定的挑战。今天,我想分享一些见解和建议,以帮助您以与Google兼容的方式使用这些框架,确保网站在搜索引擎可以获得排名。


So when it comes to understanding the implications of using JavaScript to build your website, there's really two key things that we need to talk about.

因此,在理解使用JavaScript开发网站的意味着什么时,实际上需要讨论两个关键问题。


The first is how Google actually works, how they treat JavaScript, how they understand JavaScript.

首先是Google的实际工作方式,如何对待JavaScript,如何理解JavaScript。


And the second is understanding the difference between client-side and server-side rendering of the content and HTML on your website.

其次是了解网站上内容和HTML在客户端和服务器端渲染的区别。


These two things together if we can understand these, then we can understand how Google is going to interpret our JavaScript-powered website.

如果我们能理解这两点,那么就能了解Google如何读取JavaScript网站。


OK, so let's first talk about Google. There are in fact two parts to Google's crawling and indexing of the web.

首先来讨论一下谷歌运作方式。谷歌爬取收录网站可以分为两部分:


The first part, the crawler known as Google bot is the part of the infrastructure that follows every link it can find on the web to uncover every URL on your website and on every other website on the web. The Google bot crawler can't render JavaScript. It's simply visits a page. It will do a very quick pass of any HTML that it finds on the page to see if there are any other links it can follow, but otherwise, it simply passes the URLs that it does find back to the indexer.

第一部分,被称为Googlebot的爬虫,是搜索引擎基础结构的一部分,它通过页面上的链接,去发现更多的页面。Google bot爬虫无法渲染JavaScript。它只是访问页面。爬虫会快速查找HTML页面上的链接,继续抓取新的页面,没有新页面就会将爬取到的链接返回谷歌索引(indexer)。

 

The indexer is the part of Google's infrastructure that completely renders a page of all the content, all of the CSS, all of the layout to try in the content, to try and understand what that page is about. So that when someone does a query, it can return that page if it is relevant. Now the indexer can render JavaScript.

索引是Google搜索引擎基础结构的一部分,它负责渲染页面的所有内容,CSS,布局以了解该页面的核心信息。当用户在搜索引擎搜索时,才能返回客户搜索相关的页面。Indexer可以渲染JavaScript。


So it is true to say that Google can render JavaScript-powered web pages.

因此,谷歌支持渲染基于JavaScript开发的网页。

 

But to completely understand the implications of using JavaScript, it is also important to understand the difference between client-side and server-side rendering of JavaScript, because that makes a big difference to the way that Google will interpret your website.

但是要完全了解使用JavaScript对网站的影响,理解客户端和服务器端JavaScript渲染的区别也很重要,因为会导致Google读取网站的方式有很大的不同。


So generally speaking, these modern JavaScript frameworks like React, Node, and Ember, and Angular, they render in the client side. That means that when someone visits your web page that's built on one of these frameworks, the JavaScript application is delivered to the browser and then it renders everything in the browser. It calls the CSS, it calls the content, it calls the images, and any other resources required to lay out your web page into the browser and renders them on the client side.

因此,一般而言,这些现代JavaScript框架(例如React,Node和Ember和Angular)在客户端渲染。这意味着,当用户访问基于这些框架之一开发的网页时,JavaScript应用程序将交付给浏览器,然后在浏览器渲染所有内容。将CSS,文本,图片以及其他与页面展示有关的资源推送到浏览器,在客户端渲染。


A server side rendering is when all of that work is done on the server and the HTML of the complete page and all of the content is delivered to the browser.

服务器端渲染是指在服务器端完成所有渲染工作并将完整页面的HTML和所有内容都交付给浏览器。

 

Now this has big implications for Google because as we said, the Google bot can't render JavaScript. So that means that when Google bot visits your home page or your JavaScript-powered website, if you're rendering client side, it means that the Google bot will get that JavaScript application, but it can't render any content or any link. So it won't find any other links to crawl. It will have to send that single URL back to the indexer. The indexer will then render that page it will find any links and content on that page. It will send any links back to the crawler so that they can then continue to follow those you URLs to see if they can find any other links.

这就对Google收录网站产生了重大影响,因为前面所说,Google bot无法渲染JavaScript。因此,这意味着当Googlebot访问您的主页或基于JavaScript的网站时,如果网站是客户端渲染,则意味着Googlebot将获取该JavaScript应用程序,但无法渲染任何内容或任何链接。因此Google bot无法找到页面上的链接。只会返回一个URL给谷歌indexer。谷歌Indexer将渲染页面并发现页面上的更多链接和内容。发现新的链接则会返回给Google bot去继续抓取进一步发现更多的链接。


And in this way, it really slows down the process of crawling your website in a very big way.
And this is particularly relevant for large websites. So the other thing that I have to say about client-side rendering is that Google's indexer uses a version of Chrome for rendering JavaScript-powered websites that is about three years old.

这就极大地减慢了网站被谷歌抓取的速度,这对于大型网站影响尤为重大。另外,关于客户端渲染,Google的indexer用来来渲染JavaScript网站所使用的Chrome版本已有大约三年的历史。

 

And that means that it can't support all the latest features of these modern JavaScript frameworks. So if you're building a JavaScript-powered website that renders on the client side, it is very important that you ensure that it is set up in such a way that it degrades nicely for older versions of browsers so that Google can render your content and your HTML completely.

这意味着它不能支持那些现代JavaScript框架的所有最新功能。因此,如果您要构建一个以JavaScript为基础的网站,并在客户端进行渲染,那么确保Google可以完全渲染您的内容和HTML。


I've seen many cases where a client-side rendered JavaScript page, Google is able to crawl or index part of it but it doesn't see all of the continent because of some of the features that have been included in that page. So very important that your JavaScript-powered web page degrades nicely for all the versions of the browser.

我看过很多客户端渲染的JavaScript页面,Google能够对其进行抓取和编制索引,但是页面中包含的某些功能谷歌无法完整抓取。因此要确保你基于JavaScript开发网页对于所有版本的浏览器都可以很好地渲染。

 

So we know that Google bot can't render JavaScript. And whilst the Google indexer can render JavaScript, we also know that it is limited to older versions of Chrome. So it doesn't support all the latest features of these modern JavaScript frameworks. So if we are doing client-side rendering, it is more difficult to get all of our content indexed and it really does slow down the entire process of crawling and indexing your website, which includes any changes you make. So if you make changes to your website, particularly if you have a large website, it can take weeks or months for those changes to be reflected in the Google index.

我们知道Google bot无法渲染JavaScript。Google indexer可以呈现JavaScript,但我们也知道它仅限于旧版Chrome。因此,它不支持这些现代JavaScript框架的所有最新功能。因此,如果在进行客户端渲染,则很难对所有的内容建立索引,这确实会减慢对网站被抓取和索引的整个过程,其中包括您所做的任何更改。因此,如果您对网站进行更改,尤其大型网站,则这些更改可能需要数周或数月才能反映在Google索引中。

 

So what to do? Well, our strong recommendation is to use old-fashioned content management systems for public facing web sites, first and foremost. If you haven't yet started the build of your website, then we would strongly recommend you look at one of the content management systems like Ambraco, or Wordpress, or Drupal. Or if you're doing e-commerce, use one of the platforms like Shopify, or BigCommerce.

那么该怎么办?我们强烈建议普通网站使用老式的内容管理系统。如果您还没有开始网站的搭建,那么我们强烈建议您考虑内容管理系统,例如Ambraco,Wordpress或Drupal。如果是电商网站,可以考虑用Shopify, BigCommerce电商建站系统。

 

These content management applications render everything on the server side and deliver the complete HTML to the browser and to Google, which makes it much easier and faster for Google to completely crawl and index your website.

这些内容管理应用程序在服务器端呈现所有内容,并向浏览器和Google提供完整的HTML,这使Google能够更轻松,更快地完全抓取您的网站并为其建立索引。

 

If you have already built a JavaScript-powered website, or if you really want to for whatever reason, then our drawing recommendation is to configure that application to render everything on the server side and deliver the complete HTML and content to the browser and to Google in the same way that one of these older traditional content management systems does. If you can do that properly, then it will make it a lot easier and faster for Google to index your JavaScript-powered website.

如果您已经建立了JavaScript网站,或者出于特殊原因确实想要这样做,那么我们的建议是配置该应用程序在服务器端渲染所有内容,并将完整的HTML和内容提供给浏览器和Google 就像这些较旧的传统内容管理系统之一一样。这对于谷歌快速抓取收录你的JavaScript网站会有很大帮助。

 

Perhaps, you've already launched a JavaScript-powered website that is rendering everything on the client side. You're not sure how to configure it to do that on the server side. There are third party services like Prerender.io, which might help. They might be worth looking at as well.

又或许,您已经发布了一个在客户端渲染的基于JavaScript开发的网站,不知道如何改为在服务器端渲染。有一些第三方服务获取可以帮你解决这个问题,比如Prerender.io。可以了解一下。

 

So in a nutshell, a lot of SEO is about making it easy for Google and not putting hurdles in Google's way. And when it comes to using JavaScript on your website, there are quite a few pitfalls and traps that if you're not aware of them, it's easy to fall into.

简而言之,很多SEO都是为了帮助Google而不是阻碍Google抓取网站。在您的网站上使用JavaScript时,会有很多陷阱,稍不小心就掉入。


咨询
官方微信群
官方客服

扫码添加,立即咨询

加群
官方微信群
官方微信群

扫码添加,拉你进群

更多
订阅号服务号跨境资讯
二维码

为你推送和解读最前沿、最有料的跨境电商资讯

二维码

90% 亚马逊卖家都在关注的微信公众号

二维码

精选今日跨境电商头条资讯

回顶部