What is the best practice to include scripts tag in react index.html in case of SSR(Server side rendering)

499 views Asked by At

I have setted up my react app with server side rendering which loads create the HTML data at server side and returns the HTML data back to requested client. So in this case all loading the scripts tags/html data creating the components happens at the server side it self. To improve the performance of my page what is the best practice to include the script tag ? Is it in the head tag or in body tag or after body tag. Please correct if I am wrong.

1

There are 1 answers

2
R J On BEST ANSWER

It's better to keep the scripts in the bottom of the body tag. (And in the Layout page)