Partage
  • Partager sur Facebook
  • Partager sur Twitter

Does selectively calling page specific functions i

    24 janvier 2020 à 12:40:13

    Hi,

    I'm working on a site where we're loading one semi-large bundle.js file and I am looking for ways to increase performance on the site. Our code is split into some page specific modules. We have one file where we call all our main functions from these modules.

    I was wondering if it would be good to selectively call the page specific functions using if statements or a switch that checks the url with .includes() . Is this generally best practice and would it help at all with performance?

    • Partager sur Facebook
    • Partager sur Twitter

    Does selectively calling page specific functions i

    × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
    × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
    • Editeur
    • Markdown