Issue link: https://read.uberflip.com/i/1146286
Blank White Screen
|
39
last
A value of –1 returns a Last-Modified header with a date equal to the file's time-
stamp. A value of
0 results in no Last-Modified header being returned. The
default is
–1.
redir
A value of 1 causes a 302 response that redirects back to the exact same URL
with
redir=1 removed.
The first example requires some slow images and a slow stylesheet. Those are
achieved with the following requests to sleep.cgi:
Both the image and stylesheet use the expires=-1 option to get a response that has an
Expires header in the past. This prevents the components from being cached so that
you can run the test repeatedly and get the same experience each time (I also add a
unique timestamp to each component's URL to further prevent caching). In order to
reduce the variables in this test, I specify
last=0 to remove the Last-Modified header
from the response. The image request has a two-second delay (sleep=2),
while the
stylesheet is delayed only one second (sleep=1).
This ensures that any delay seen is
not due to the stylesheet's response time, but instead to its blocking behavior (which
is what the page is testing).
Being able to exaggerate the response times of components makes it possible to visu-
alize their effects on page loading and response times. I've made the Perl code avail-
able so others can use it for their own testing (http://stevesouders.com/hpws/sleep.txt).
Copy the code into an executable file named sleep.cgi and place it in an executable
directory on your web server.
Blank White Screen
This section shows two web pages that differ in just one respect: whether the
stylesheet is at the top or bottom of the page. What a difference it makes to the user
experience!
CSS at the Bottom
The first example demonstrates the harm of putting stylesheets at the bottom of the
HTML document.
CSS at the Bottom
http://stevesouders.com/hpws/css-bottom.php

