Instructions
Basically, just enter a URL and then click the Submit button. The fine print follows...
- URL: Must begin with http:// ; we don't do secure servers.
- Request Type:
- GET, the default, shows both the header and content.
- HEAD shows only the header -- a good choice if that's all you care about, or if you anticipate a very large amount of content.
- TRACE is of limited interest -- it just reiterates the request.
- Display Format:
- Auto-Detect, the default, looks at the Content-Type line in the header and chooses what it thinks is the appropriate display type.
- Text forces text display, which is suitable for HTML files.
- Hex forces hexadecimal display, which would be more appropriate for image files.
- Auto-Follow Location: If the server returns a Location: line in the HTTP header, it instructs your browser to "forward" or "redirect" itself to that new location. If this option is selected, HttpView will automatically continue to query such new locations (up to a maximum of 4 times).
What You'll See
The Header section shows stuff that your browser would receive but not display. For example:
- Last-Modified: tells when the file was most recently modified
- Set-Cookie: asks your browser to create a cookie
- Location: asks your browser to go to another URL
The Content section shows the data that your browser would display for you -- somewhat like using your browser's View Source feature.
In a text display, non-text characters are shown as follows:
- (LF) = Linefeed, aka Newline (hex 0A)
- (CR) = Carriage Return (hex 0D)
- (HT) = Horizontal Tab (hex 09)
- (00) = Hexadecimal 00
Interesting Examples
- Try entering http://www.amazon.com as the URL in the form above, and select the auto-follow-location option. You'll see that Amazon redirects you twice while setting various cookies.
Note that if you aim your browser at http://www.amazon.com, the exchange might be somewhat different. If any amazon.com cookie values were already set on your system, your browser would send them back, and Amazon would respond accordingly (greeting you by name, for instance).
- If you use Netscape Navigator: Aim your browser (not this form) at http://www.anywho.com/telq.html. Then look at the HTML code (View/Source). You'll see some styles defined and some embedded JavaScript code. But you'll also see, about 35 lines down from the top, <script language="JavaScript" SRC="/coockie.js">. How can you see the code in the "coockie.js" file? Not by aiming your browser at http://www.anywho.com/coockie.js! But you can see the JavaScript code by entering http://www.anywho.com/coockie.js in the form above.
Willem Broekema points out that you can also use Navigator's "view-source" feature: use view-source:http://www.anywho.com/coockie.js as a URL.
This same technique may be used to view cascading style sheet (CSS) files.
This is not necessary with Microsoft's Internet Explorer 5.0 -- it will display JS and CSS files directly.