tmp-platform-swr/web/slow-but-fast.php

9 lines
289 B
PHP
Raw Normal View History

2021-03-08 03:57:46 +00:00
<?php
2021-03-08 14:40:45 +00:00
header('Cache-Control: s-max-age=1, stale-while-revalidate=99999999');
2021-03-08 03:57:46 +00:00
sleep(5);
print('This is a slow instant test. ' . date('Y-m-d H:i:s'));
?>
<p id="js-date"></p>
<script type="text/javascript">
document.getElementById('js-date').innerText = new Date().toISOString();
</script>