One other method:
In the PHP function called by Ajax use query something like WHERE post_id NOT IN ($shown) ORDER BY RAND() LIMIT 1
and for $shown can be added to the $_SESSION each time one post is displayed.
In this method even if the user refreshes the browser the shown can be retained. If you don't want to retain the shown list on refresh you can clear up the $_SESSION['shown'] variable in that page.
Some pseudo code:
// Start your session
session_start();
$shown='';
if (!empty($_SESSION['shown']) && is_array($_SESSION['shown']) ){
$shown = implode(',',$_SESSION['shown']);
}
if (!empty($shown)){
SELECT post, post_id FROM post_table WHERE yourconditions AND post_id NOT IN ($shown) ORDER BY RAND() LIMIT 1
}else{
SELECT post, post_id FROM post_table WHERE yourconditions ORDER BY RAND() LIMIT 1
}
$_SESSION['shown'][]=$post_id;