Does. load() load the whole content of the requested page or just a portion?
The whole content. The only way to change that would be by changing the server-side code to only return the desired content when it is an ajax request. Ajax requests can be detected by looking for the x-requested-with
header.
Sample logic would be:
isAjax = doesHeaderExist && doesHeaderEqualXHR;
if (!isAjax) {
include("header.ext");
}
include("page.ext");
if (!isAjax) {
include("footer.ext");
}