It all depends on what you are developing for, but here are some rules of thumb.
HTTP requests mean overhead (especially over HTTPS) so try to make as little as possible, for mobile this is crucial. there are a few exceptions though; lazy loading JavaScript files which aren't needed when the app initializes is sometimes smart so they're cached when really needed, using a CDN for popular libs sometimes can lead to great performance boost because of paralel downloads.
keep downloads as small as possible, so minify all JavaScript and CSS, some even minify HTML.
make sure cache headers are set correctly (some set them to a year or more), and when a new version of your script is deployed, append the src attribute of the script element with a version number to counter caching, like: <script src="myapp.js?v=2"></script>
Sometimes perceived performance is better than real performance, meaning; having the HTML loaded and rendered is more important than the application initialized. this can be done by asynchronously loading JavaScript files (by inserting script elements with JavaScript like Google does or by using script loaders which do this for you). but this leads to new challenges like the execution order of loaded files or interacting with the page before the script files are fully loaded and parsed.
In the end it's heavily dependent on the architecture of your online app or site and what the interaction with it is or should be, care to elaborate further by giving some examples?
PM5544.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…