> Tools > HTTP Header Viewer
Screen-friendly version  | Set your preferences

HTTP Header Viewer

By Eric Giguere
September 22, 2003
Updated June 2, 2008

This simple tool lists the HTTP request headers that your browser sends. (Note that it doesn't show the response headers, you need a separate tool for that.) It's a companion to the article Masquerading Your Browser that discusses how you can get your web browser to masquerade as another type of browser.

Your Headers

These are the HTTP headers your browser is sending to

host localhost:8077
user-agent CCBot/2.0 (
accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language en-US,en;q=0.5
if-modified-since Wed, 20 Mar 2019 15:11:45 GMT
accept-encoding gzip
connection close

Other information about your browser:

In general, each request that you make from your browser includes information identifying the type of browser (usually referred to as the user agent), what kind of content the browser accepts, the acceptable languages, and so on. Note that this viewer does not show the response headers, the HTTP headers that a web server sends in response to a request. To see response headers, use a tool like Rex Swain's HTTP Viewer.

If you don't like what the browser is sending, maybe you should switch to the free Firefox browser!

Header Viewer Source Code

In case you're wondering, here is the code that prints the headers:

<table width="100%" border="0" cellspacing="0" 
       cellpadding="8" bgcolor="#EEEEEE">
    <tr><td colspan="2" width="100%" height="2" bgcolor="#000000"></td></tr>
    <c:forEach var="hname" items="${pageContext.request.headerNames}">
        <c:forEach var="hvalue" items="${headerValues[hname]}">
            <tr><td valign="top"><c:out value="${hname}"/></td>
            <td valign="top"><c:out value="${hvalue}"/></td></tr>
            <tr><td colspan="2" bgcolor="#000000" width="100%" height="1"></td></tr>

As you can see, it's very easy to access the HTTP headers using the Java Standard Tag Library (JSTL), a powerful tag library for use with JavaServer Pages (JSP).

If you didn't realize that this page was built using JSP pages, See How This Site Works for the details.

Sponsored Links
Why are these ads here?

Google Web   
1-by-1 black pixel for creating lines
Copyright ©2003-2009 Eric Giguere | Send mail about this page | About this site | Privacy policy
Site design and programming by Eric Giguere | Hosting by KGB Internet Solutions
This site is Java-powered | Get Firefox!
This page was last modified on Last modified on November 17, 2005