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

Schema JSON codes and their effect on the page speed rank

· 52CE 我爱测

I searched in many articles but nobody has talked about this stuff. For example, google suggested JSON-LD for structured data but I wanna know if I add dozens line of JSON codes, does not it affect on my page speed badly? I mean …

问题原文

原帖链接 · irgfx · CC BY-SA 4.0

I searched in many articles but nobody has talked about this stuff. For example, google suggested JSON-LD for structured data but I wanna know if I add dozens line of JSON codes, does not it affect on my page speed badly?

I mean tools like GTMetrix pay attention to inline JS codes and say:

it is better to minify and load inline codes from a file instead of using them inline.

已采纳解答

原帖链接 · Henry Visotski · CC BY-SA 4.0

Besides being Google's preferred structured data markup format for a reason, JSON-LD is described as "a lightweight Linked Data format" on its documentation site.

Also, according to this blog post, "Unlike JavaScript there is no render delay with a data linking format. This means you can place the code anywhere you like without having to worry about slow loading times. The code will increase your HTML content size, but only by a tiny bit – completely negligible when it comes to page load times."

And according to this post, "It does not affect the performance of the page because it can be loaded asynchronously." Basically, you can insert it almost anywhere on the page - head and footer are both fair game.

Think of it this way. JSON-LD structured data format describes the content on a page. It is not a script that does a lot of heavy lifting or transforms anything on a page. It is therefore very lightweight, and unless there is another underlying issue, it won't slow down your website.

As for minification of code, yes, that is recommended regardless.

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

资料来源与适用范围

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

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

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