Jan 10, 2013 at 5:49 PM
Based on my understanding, it seems like the reason for using this approach could be related to the drawbacks mentioned in the
Content Retrieval Decisions in Mileage Stats section of the documentation, particularly to the drawbacks of giving the widgets URLs to request partial views as needed:
"This had a number of drawbacks. First, it increased the surface area of the server by exposing the additional endpoints the widgets needed to request the necessary HTML fragments. Second, the number of Ajax calls made by the client increased because
each widget needed to retrieve both the required data and the partial views. The increase in calls also created additional failure points and made the error handling code for the widgets more complex."
Hence, it seems that the layout page contains all the templates, scripts and so on in order to avoid the aforementioned drawbacks. As you mentioned this could cause some overhead when
HTML and hide this notification in the first action the application script takes, in order to keep it only when the client browser does not support it.
On the other hand, the possibility of telling the user that the application will not work without