I have a problem with loading only one part of the page with pjax script.. It finally works in Chrome and Firefox but not on the ipad's safari (latest version). When I check the pjax heroku demo site the script works just fine (so the problem is on my side).
Here is the code I'm using:
<?php if($_SERVER["HTTP_X_PJAX"]): ?>
<div id="main">first change</div>
<?php else: ?>
<html>
<head>
<script src="http://pjax.heroku.com/jquery.js"></script>
<script src="http://pjax.heroku.com/jquery.cookie.js"></script>
<script src="http://pjax.heroku.com/jquery.pjax.js"></script>
<script type="text/javascript">
$(function() { $('a').pjax('#main'); });
</script>
</head>
<body>
<?php
$header = "this is first part
<br/> <a href='pjax2.php' data-pjax='main'>GO</a>";
$date = date("Y-m-d H:i:s");
$footer = "this is first part";
echo "$header<br/>$date<br /><div id='main'>first page</div><br />$footer";
?>
</body>
</html>
<?php endif; ?>
Here is also the example link http://bluereservations.com/pjax.php
If you are using Chrome or Firefox the script loads only the requested part, while on safari the whole page is loaded.
Do you have any ideas what could be the problem?