Just how bad is the approach the connection of js on a single page, not in the footer?
Good afternoon. Tell me, please, I have a couple of small site on Bitriks on Modx. On both sites a very long time to boot home. I already have poimal that is possible. Well, nothing helps. I looked in the developer tools download speed every. js script. Is there a script Yandex maps - over 3 seconds. I have this script on the home is not necessary - only on the contact page. But we all know that all scripts just log in the footer in the template. Just how bad is the approach of connecting some scripts on a separate page, not in the footer?
Approach nothing good. Individual page scripts should be tightened only on this page.
General scripts will be let in the footer
Ella.Leffl answered on March 12th 20 at 08:08
What you don't understand.
True, the scripts need to drive down. But generic scripts not so much.
In Laravel, for example, you mark in the basic template script block. and on page templates put it in the scripts is needed for this page.
Page is always different: the filters are tricky, the gallery, the cards, the animation of what the landing page, the contact form.
In my experience: if you are referring to a local js - before megabyte can and universal reference, everywhere. If more happens - you have to share.
In the case of external. js only on pages where needed. There is often podglyuchivaet and delayed