in the server app I'm creating a hash string of all the HTML output I'm going to send:
ob_start();
?>
<!DOCTYPE HTML>
<html>
...
</html>
<?php
$html = ob_get_clean();
$hash = md5($html);
print $html;
exit;
How can I send the hash string too, but in some way that the javascript is able to read it?
I thought about adding it with header()
before calling print but it appears that javascript cannot read page headers, only in ajax mode but this is not an ajax request :/