angularjs - SPA initial load time -


the downside spa of course initial load time.

for example, have created askacarpro.com durandal.

it has "loading" screen while loads. thinking maybe bad idea. reminds me of all-flash website - pretty, no-one wants watch loading spinner when first site.

another example found @ random mybestegg.com angular site. nothing special, has cold load time of 6 seconds on machine.

but has no splash screen jumps around bit while loading. don't know better splash screen.

is there best practice dealing inevitable spa load time? app should bundled , minified as possible, there going delay while app starts up.

this perhaps more of designer type question programming question. yet important load factor reason not use spa.

apart minify css , html, gzip, etc , since question has angular tag suggest take @ lazy loading of modules/css oclazyload offers.

to keep js small possible can use jsinspect dry possible

purifycss remove unused css , can detected rules added dynamically e.g. using ng-class

using library head.js or labjs or script can load js files in way eliminates rendering blocking during page-load

  <script>     [       '@@angular',       '@@angular-ui',       '@@yourapp',     ].foreach(function(src) {       var script = document.createelement('script');       script.src = src;       script.async = false;       document.head.appendchild(script);     });   </script> 

something imagemin minimize size of images, same svg


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -