Of course, all the HTML will be loaded.
If you want to avoid this, you need to create some kind of serveride script, for example PHP, which will send only the necessary content.
You could call it something like
$('#result').load('ajax/test.php?ajax=1');
and in PHP check for the existence of $_GET['ajax'] , and if it exists, send only the #container div.
source share