There may well be reasons not to send all your scripts (or css) at all.
However, in many cases this is the right approach. You just need to take care to avoid collisions.
Therefore, I would recommend putting your javascript in some .js files, your css in .css files, and loading at least all your css and the necessary js for all pages that require their content.
if you need a more modular approach, please be more specific so that we can see what suits your needs.
source share