A Whirly Wiry Web article about The Revealing HTTP Headers - View HTTP server response headers and unprocessed HTTP content. Authored by RockinFewl.

Query words: view headers,view http headers,view response headers,view server response headers,show http headers,show http headers,show response headers,show server response headers,http headers,response headers,headers,http status,server response status,http response status,http server response status,getheaders,rockin at whirlywiryweb.com.

This article applies to MSIE 5+ | Windows 9x, Me, NT, 2000 | Local, Internet.

Article styled for generic XHTML1 capable agents. Parts considered incompatible are marked [Part not rendered to your browser].
You may obtain this article styled for Microsoft Internet Explorer 5+ here.

The Revealing HTTP Headers
View HTTP server response headers and unprocessed HTTP content.

HTTP Made Easy

It all started that afternoon. I was curious about how many Windows 2000 web servers were out there. Was Amazon hosted on Win2K? Barnes And Noble? Nasdaq?

I was aware that web servers often identify themself in the HTTP server response headers, yet a web browser doesn't show those.

This is where my GetHeaders tool comes in: it shows all HTTP headers, including server identification, the page cache option, last modification date, cookies... you name it.

Additionally, the tool measures the server response time and can show the HTTP page content.

The HTTP content is displayed exactly like it was retrieved from the server: not executing onLoad() scripts, not following redirects, not validating HTML. So you can use your regular browser to download WML code without problems. You can catch the code embedded in frameset or redirector pages, a thing hard to do otherways.

Scope

[Embedded Script not rendered to your browser]

The tool is a regular HTML page that uses the Microsoft.XMLHTTP ActiveX control. If you have Internet Explorer 5 you're okay.

However, if the XMLHTTP control is hosted on an Internet page, it can only access URLs that are in the same domain. I noticed that the control may react differently (on the security level) if you want to connect to a different domain. It depends a bit on the version of XMLHTTP installed. Anyway, the control doesn't complain at all if the visitor adds the page to the Trusted Sites.

If you like the tool, I advise to download it and to put it on your hard disk. This way the page is automatically trusted and you'll never run into security problems again.

Try it!

This page provides identical logic to view the HTTP headers of any page hosted at the Whirly Wiry Web. If you dare, you may add this page to your Trusted Sites for a moment, and reveal the HTTP headers attached to any web page on the Internet.

This way you will see that WhirlyWiryWeb.com, BarnesAndNoble.com and Nasdaq.com are hosted on IIS/5.0 servers (i.e. Windows 2000, Internet Information Server 5.0).

URL (omit http://)

[Embedded Script not rendered to your browser]

Status
Response Time
HTTP Headers

Status.

This is the HTTP response code. Here's a small list with the most common ones:

200URL located, content follows
302Object moved (results in a redirect)
304Not modified (results in getting the file from cache)
400Bad request
401Unauthorized
403Forbidden
404Requested URL not found
405Server does not support requested method
500Unknown server error
503Server capacity reached

Response time.

The response time is the time between the request and the moment the first HTTP package is received. In other words, it's the time needed to resolve the web server plus the web server reaction time. Notice that subsequent requests take less time: once the path to the web server is determined, this part goes a lot faster.

Also notice how sometimes the headers may change: quite often your local proxy caches the page, resulting in considerable lower response times.

HTTP headers.

The number and kind of the HTTP headers varies depending on the web server brand, and on the type of the intermediate proxy server.

These ones are typical:

ServerIdentification of the web server
ViaIdentification of intermediate servers (most often just the proxy server)
Content-LengthThe size of the content in bytes
Content-TypeThe MIME-type of the content
Cache-ControlThe web server's recommendation on how the page should be cached:

private is in your local cache, public is in the proxy's cache.

For a complete list see HTTP Response Headers at MSDN.

Download

GetHeaders.html is a regular HTML page with no external scripts or stylesheets. Use 'Save Target As' to save the single file somewhere on local media: it's all you need to do.

Conclusion

I find myself using this tool quite often. It's very easy to download web content, without igniting onLoad() scripts, behaviors or xsl stylesheets. The HTTP headers reveal whether the proxy is caching the page, or when it expires.

GetHeaders.html was definitely something I quickly put on my Favorites menu!


Also at the Whirly Wiry Web:

DHTML Gems
Fine DHTML tricks that may save your day. (Script)

Fighting eZula
The Web author's war against contextual advertising. (Script)

Detecting TopText and Surf+
Detecting eZula TopText and Spedia Surf+ Enabled Browsers (Script)

The Revealing HTTP Headers
View HTTP server response headers and unprocessed HTTP content. (Tool)

Launch-in-IE
Web pages can start applications. Securely. (ActiveX)

Open Office from a Web Page
Override IE's default behaviour to open Office documents in the browser window. (Script)

ShellExe launches HTML files from AUTORUN.INF
A ShellExecute wrapper that delivers (Utility)

Stealth Browser-Server Conversations
Exchanging data with the server without a page refresh. (Script)

Whirly Wiry Web Today
News, mission, and more skinnies you might be interested in. (General)

Dockyard
Material in test. (-)


The Whirly Wiry Web is RockinFewl's test bed and showcase in one.
All content, code and graphics are entirely crafted at our own premises, but material can freely be reused if charming credit is given.

WhirlyWiryWeb.com, 2001-2006. Address comments to Rockin at WhirlyWiryWeb.com