B. Henao
B. Henao

Reputation: 1

How works browser caching for index.html on a single page application

And injecting all the design on the head like JSS does, it has some benefit on performance?

Upvotes: 0

Views: 37

Answers (2)

Oleg Isonen
Oleg Isonen

Reputation: 1493

Do you mean critical path for SSR?

Upvotes: 0

Cory Edwards
Cory Edwards

Reputation: 36

If you are asking whether adding javascript and css inside of the header rather than in the body gives some form of performance improvement, it does not. It just matters whether the files will be loaded before or after the body is created. Some utilities require you to even put script tags after a certain line of html inside of the body so that the library will be able to see the needed DOM element.

Everything gets loaded before the user sees the page whether that is in the head or in the body. The only way to have things loaded truly dynamically, that I know of, is to use javascript to add script tags or iframes that will be loaded at a later time.

So, no there is no performance improvement.

Upvotes: 1

Related Questions