The browser DOES see it. The webserver will add the status by itself, or takes it from the Status header.
This means there'll be _two_ requests, one'll hit the request, one'll hit the image. If everything's fast enough, the user will never notice.
a251111.upc-a.chello.nl - - [19/Dec/2001:16:55:17 +0100] "GET /test/te
+st.cgi HTTP/1.1" 302 286 "-" "Mozilla/5.0 (compatible; Konqueror/2.2.
+2; Linux 2.4.10-ac12; X11; i686; en)"
a251111.upc-a.chello.nl - - [19/Dec/2001:16:55:18 +0100] "GET /test/te
+st.txt HTTP/1.1" 304 - "-" "Mozilla/5.0 (compatible; Konqueror/2.2.2;
+ Linux 2.4.10-ac12; X11; i686; en)"
The 302 status is "Found", which tells the browser to re-request using the URL in the Location-header.
The 304 is "Not modified", telling my browser to use the cached version.
2;0 juerd@serv:~/juerd.nl/juerd.nl/test$ cat test.cgi
#!/usr/bin/perl
print "Location: test.txt\n\n";
2;0 juerd@serv:~/juerd.nl/juerd.nl/test$ cat test.txt; echo
Hello world
merlyn, perhaps you meant s/browser/user/; s/CGI/HTTP/; s/server/browser/?
2;0 juerd@ouranos:~$ perl -e'undef christmas'
Segmentation fault
2;139 juerd@ouranos:~$
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.