We switched from a 100% angularJS website to a mixture of angularJS and 
Umbraco.


Side effect of this is that the webserver is now controlling the routing so 
that when a user clicks a link from one angularJS page to another, a lot of 
the time there's a full page reload - everything - as though they clicked 
refresh. This doesn't happen if the pages are using the same view. On the 
old site, there was NEVER a full page reload. Header/footer view files 
stayed the same, sometimes a new view file was loaded and there was a 
history change.


So the question is - *what's the disadvantage to doing it like this for 
second page load times*? 


If necessary, this is my understanding as a non-angularJS developer. Any 
true/false on these would also help!



   - The web server/browser will work together to cache the page components 
   (views, scripts). 
      - Download time for those on the second page will be non-existent. 
      - However download of files/assets is only a small part of page load 
      times. From Chrome's audit.
   
<http://i.imgur.com/cmGIxJY.png>


   - AngularJS sites are likely to have a longer "scripting" and 
   "rendering" time than sites built at server side. 
      - I've guessed that this is because the angularJS framework needs to 
      be "evaluated" into memory, as well as the scripts for the web site that 
      extend angularJS for that particular website. 
      - If the web server controls routing, this "scripting" overhead can't 
      be cached from page one to page two because it's caused by the browser 
      reading the files and then "running them" - loading the various functions 
      into the browser tab's memory.
      - The exception to this is when angularJS controls the routing. If 
      that happens these scripts don't have to be "re-evaluated" into memory on 
      the second page because they're already loaded.
      - When AngularJS controls the routing, only the assets and scripts 
      that aren't already loaded on "page 1" will need to be loaded into the 
      "virtual page 2" - reducing scripting time. We get a reduced page 
      load time for second, third, fourth, fifth, etc.  pages. 
   - When the web server controls routing, it hits a reset switch and 
   everything needs to be "evaluated" and loaded into memory again. 
      - As mentioned, caching will mean that the files necessary will be 
      available to the browser instantly
      - The overhead from loading angularJS scripts into memory (executing 
      the code) will need to repeated on each page where there's a full reload.
   

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to