dimanche 17 juillet 2016

Loading javascript file in different endpoint

I'm writing a large javascript app and it's a single page application. I'm using node.js with jade. And I have question about loading javascript files for the front end. Like you have these pages : - profile - dashboard - setting I should load profile.js when the user only come to the profile page correct? I have a layout.html for header and footer, and above pages are children of the layout. I don't want to load everything at the home at once because that will be too heavy. But my question is am I doing it right by putting my javascript at the bottom of every html file? same go with my css file.

Aucun commentaire:

Enregistrer un commentaire