Quantcast

What works and what is paused ยท Email is limited to account activation and password resets.

Jump to content


Photo

Teach me!


  • Please log in to reply
7 replies to this topic

#1 Devilfish

Devilfish
  • 259 posts

Posted 14 January 2010 - 05:52 PM

About headers. I've seen the term pop up here and there and I've looked it up with mah Google, but I can't find an explaination that I can really understand. Any of you internet-savvy people here want to explain to me, in layman's terms, what they are and why we have them? I'd be really grateful!

Advertisement

    #2 iargue

    iargue
    • 10048 posts


    Users Awards

    Posted 14 January 2010 - 06:02 PM

    Header can relate to many things, but I will explain HTML Headers.

    This relates to the first section on the HTML code, it usually contains Javascript that needs to run on the page, a title, and meta tags to identify the page.

    Many robots (Computers designed to visit and index pages of the internet) will load just the header of a page, which gives them keywords, and a title.

    This is an example of an html header.

    <HTML>
       <HEAD>
          <TITLE>My first HTML document</TITLE>
       </HEAD>
       <BODY>
          <P>Hello world!
       </BODY>
    </HTML>
    


    In general, a header relates to data that is sent first, or that loads first. For instance, at the top of our page, you see a neocodex logo and a bunch of tabs you can click. This is our header, and it is sent first, on every page you load.

    #3 kittycat

    kittycat
    • 633 posts

    Posted 14 January 2010 - 06:03 PM

    you mean like [h1] ? [/h]
    they are just used to separate, signify importance, a title, whatever... nothing important.

    #4 iargue

    iargue
    • 10048 posts


    Users Awards

    Posted 14 January 2010 - 06:12 PM

    you mean like [h1] ? [/h]
    they are just used to separate, signify importance, a title, whatever... nothing important.



    I hope you never become a teacher.

    #5 Noitidart

    Noitidart
    • Neocodex Co-Founder

    • 23214 posts


    Users Awards

    Posted 14 January 2010 - 06:19 PM

    Do you mean http headers? like headers that are sent whenever your internet makes a connectin?

    #6 Melchoire

    Melchoire
    • 5284 posts


    Users Awards

    Posted 14 January 2010 - 07:27 PM

    If you're referring to HTTP headers they're blocks of data sent back and fort between client and server in order to communicate what data to exchange. I can elaborate further if you want...

    #7 Andy

    Andy
    • 226 posts

    Posted 14 January 2010 - 10:29 PM

    Umm, long explanation coming up, sorry if I bore you.

    When a web browser connects to a web server (ie computers with files on them which browsers can take files from), it needs to give the server information about the file it wants to retrieve, for example a browser which wants to get index.html from example.com, it will send these request headers to the example.com server.

    GET /index.html HTTP/1.1
    Host: www.example.com
    
    

    this is the simplest possible request header.

    The lines are separated by a CRLF (0x0D 0x0A) and the request is stopped with a double newline.

    The server will then return something such as this:

    HTTP/1.1 200 OK
    Date: Mon, 23 May 2005 22:38:34 GMT
    Server: Apache/1.3.3.7 (Unix)  (Red-Hat/Linux)
    Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
    Etag: "3f80f-1b6-3e1cb03b"
    Accept-Ranges: bytes
    Content-Length: 438
    Connection: close
    Content-Type: text/html; charset=UTF-8
    
    <content>
    Each line as above is separated by a crlf as mentioned above.

    A server response is followed by a blank line and text of the requested page. The ETag (entity tag) header is used to determine if a cached version of the requested resource is identical to the current version of the resource on the server. Content-Type specifies the Internet media type of the data conveyed by the http message, while Content-Length indicates its length in bytes. The HTTP/1.1webserver publishes its ability to respond to requests for certain byte ranges of the document by setting the header Accept-Ranges: bytes. This is useful if the client needs to have only certain portions[8]of a resource sent by the server, which is called byte serving. When Connection: close is sent in a header, it means that the web server will close the TCP connection immediately after the transfer of this package.

    From Wikipedia


    For more information:


    #8 Devilfish

    Devilfish
    • 259 posts

    Posted 15 January 2010 - 06:24 AM

    I did mean HTTP headers, I should have specified. Thanks for the answers everyone!


    1 user(s) are reading this topic

    0 members, 1 guests, 0 anonymous users