Defer Parsing JavaScript or use Angular

I try to fix page loading and need to know if it is an old way to defer parsing JavaScript like

or it is better to avoid any jQuery snippets due and move all Javascript files into Angular and start over.

My goal is to leverage browser caching for the cacheable resources.

I’m having a difficult time understanding how Angular is related to your question.

1 Like

Angular based app will combine files into one. If you have 20 jQuery files you can not combine into one.

You can transpile, minify and concatenate assets (e.g. JavaScript) by introducing a build step.

I suggest looking into webpack.

1 Like

That is done using a build tool like webpack, gulp, or grunt. It is not proprietary to Angular.

1 Like

Thank you for this information.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.