Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt about header

 
Arunabh Dash
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI friends ,
I have a doubt about the request header . Can anyone explain about the request header . I mean why it is needed .
And one more thing is that i came to know that , when we add a header a cookie is being added . Is it so ? If yes then can anyone explain how it happens .
with regards
Arunabh
 
Arunabh Dash
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please someone reply . I am not clear about the implementation of the header . In what point i will add some data in the header ???
And is it like when i add a header a cookie is being creater for that header ??
Expecting reply soon
Arunabh
 
Stary Kapec
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is an example of HTTP GET request, all below first line are request headers.



Request header is a name value pair. Every HTTP request includes few headers.
Some of them contain information about user's browser and its capabilities. For example if it supports compressed response or which encodings it can accept. These information can be used by the server to customize the response.


And one more thing is that i came to know that , when we add a header a cookie is being added


No, if you add a cookie in response to a request. The cookie will be send back, as a request header, by the browser with every following request. Browser will do it automatically provided it accepts cookies.


In what point i will add some data in the header


You can't. It is the job of a browser to properly set request headers. It happens automatically. But you can read the information contained in these headers.
[ January 10, 2007: Message edited by: Jasiek Motyka ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic