1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines
EricGiguere.com > Tools > HTTP Header Viewer
Printer-friendly version Set your preferences
Read my blogs on AdSense and affiliate marketing
 
 
 
  
Learn about these ads

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 EricGiguere.com:

NameValue
host localhost:8077
accept */*
user-agent claudebot
x-forwarded-for 3.229.122.112
x-forwarded-host www.ericgiguere.com
x-forwarded-server www.ericgiguere.com
connection close

Other information about your browser:

  • IP Address: 0:0:0:0:0:0:0:1
  • Hostname: 0:0:0:0:0:0:0:1

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><b>Name</b></td><td><b>Value</b></td></tr>
    <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>
	    
        </c:forEach>
	
    </c:forEach>
</table>

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.

Google Web www.ericgiguere.com   
1-by-1 black pixel for creating lines
 
Copyright ©2003-2012 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
Other sites: The Unofficial AdSense Blog | Google Suggest Explorer | Invisible Fence Guide | Synclastic
This page was last modified on Last modified on November 17, 2005
1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines