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.

1 Answer 1


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.

  • I feel like all the benefits I was gonna receive from minifying my code will be blown apart and then some by adding json-ld. If this much code makes no difference then minifying should not be a thing.
    – Whip
    Mar 9 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.