3 ms·
I don't think it's ever best practice to inline significant amounts of javascript (aside from bootstrapping code). Inlining CSS might be viable based on some re
by nowprovision 11y ago
I don't think it's ever best practice to inline significant amounts of javascript (aside from bootstrapping code). Inlining CSS might be viable based on some recent HN articles, but a SPA generally has a non-trivial amount of javascript code and dependencies thus I can only forsee disadvantages even if you make the inlining part of your gulp/grunt workflow. You can add long-live cache directives to your javascript sources and bust them with a checksum/date/revision e.g. ?v=abc123def
I suspect battery drain would be a bigger concern during the SPA running time, is it polling, does it use requestAnimationFrame for rendering, is it doing a non trivial amount of work client-side etc..
- dandare 11y agoCAn you be more specific on what disadvantages you mean when you talk about javascript code and dependencies?