AJAX or other JavaScript is not necessarily required, depending on what exactly it is you want to accomplish. (I'm not entirely clear, myself, from the original post.)
Perhaps all you need is to put the "boiler plate" portions common to all your pages into separate files, then [man]include[/man] or [man]require[/man] them into each page. Or, a bit more flexible in some situations would be to put those portions into user-defined functions in a PHP file, [man]require_once[/man] that file at the start of each page, then call the applicable function as needed within each page. This latter approach allows you to provide parameters to each such function, such as to specify what text to use within the <title> section of your page's head section.