Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Practical Use for Header Values?

 
Jack Gold
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand the passing of parameters and how cookies are used for session management, but how are user-defined header values useful??

HFSJ Ch4 introduces the addHeader("foo", "bar") and setHeader() methods, but does not discuss their practical use!
[ August 09, 2005: Message edited by: Jack Gold ]
 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setHeader might be used if you need to control stuff like cache.

response.setHeader("Cache-Control","no-store"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic