Answer the question
In order to leave comments, you need to log in
Is it ok to split javascript like this?
For example, now I include the same app.js file for all pages on the site. Therefore, when I need to initialize some Owl slider on the "Contacts" page, I have to first if/else check if the required element is even on the page.
Bottom line: is it okay to include one common app.js file for each page on the site and another unique one for each page, for example, contacts-page.js?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question