You can use Angular.js and Angular-route.js,
would look like this:
HTML Page
<html ng-app="TesteApp">
<head>
<meta charset="UTF-8">
<title>Teste Rotas</title>
</head>
<body>
<a href="#/pagina-1">Pagina 1</a>
<a href="#/pagina-2">Pagina 2</a>
<h1> Master Page </h1>
<div ng-view>
<!--Dentro da div ng-view , será renderizado nossas partials-->
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script><scriptsrc="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular-route.js"></script>
<script src="main.js"></script>
</body>
Main.js file
//Modulo do app
var app = angular.module("TesteApp", ['ngRoute']);
//Configuração das rotas
app.config(function ($routeProvider) {
$routeProvider
.when("/pagina-1", { //URL
templateUrl: "caminho/pagina-1.html", //Caminho da pagina HTML
controller: "nomeController" //controller que será usado
})
.when("/pagina-2", { //URL
templateUrl: "caminho/pafina-2.html", //Caminho da pagina HTML
controller: "nomeController" //controller que será usado
})
.otherwise({ redirectTo: '/pagina-1' }); //Se não for nenhuma url , redireciona para esta
});
app.controller("nomeController",function($scope){ //Controller
$scope.mensagem = "Olá"
});
And as the URL changes, the pages will be rendered within the div with ng-view.