Other tries
This commit is contained in:
parent
55647a6ff1
commit
74b63f1f6f
@ -1,8 +1,12 @@
|
||||
<?php
|
||||
header('Cache-Control: max-age=20, stale-while-revalidate=80');
|
||||
sleep(10);
|
||||
header('Cache-Control: s-max-age=10, stale-while-revalidate=20');
|
||||
sleep(5);
|
||||
print('This is a slow test. ' . date('Y-m-d H:i:s'));
|
||||
?>
|
||||
<ul>
|
||||
<li><a href="./slow.php">Slow</a></li>
|
||||
<li><a href="./slow-but-fast.php">Slow but fast</a></li>
|
||||
</ul>
|
||||
<p id="js-date"></p>
|
||||
<script type="text/javascript">
|
||||
document.getElementById('js-date').innerText = new Date().toISOString();
|
||||
|
9
web/slow-but-fast.php
Normal file
9
web/slow-but-fast.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
header('Cache-Control: s-max-age=1, stale-while-revalidate=20');
|
||||
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>
|
9
web/slow.php
Normal file
9
web/slow.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
header('Cache-Control: s-max-age=10');
|
||||
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>
|
Loading…
Reference in New Issue
Block a user