Take a look at this $routeProvider
configuration for the navbar
and let's assume there is no caching involved
app.config(function($routeProvider) {
$routeProvider
.when('/', {
templateUrl : 'pages/home.html',
controller : 'mainController'
})
.when('/about', {
templateUrl : 'pages/about.html',
controller : 'aboutController'
})
.when('/contact', {
templateUrl : 'pages/contact.html',
controller : 'contactController'
});
});
I came across online information stating that one of the benefits of Single Page Applications is saving network bandwidth since it doesn't have to transfer HTML tags every time a user switches pages.
But in a scenario like the one mentioned above where the navbar
includes links to home, about, and contact pages that are routed separately, wouldn't it still require transferring HTML tags each time?
Does it still reduce network bandwidth by avoiding the transfer of HTML tags?