Take the 2-minute tour ×

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: ?>
<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'); });
$header = "this is first part
<br/> <a href='pjax2.php' data-pjax='main'>GO</a>";
$footer = "this is first part";
echo "$header<br/>$date<br /><div id='main'>first page</div><br />$footer";
<?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?

share|improve this question
add comment


Your Answer



Browse other questions tagged or ask your own question.