wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to use Javascript to get HTTP Header variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to use Javascript to get HTTP Header variables" Watch "How to use Javascript to get HTTP Header variables" New topic
Author

How to use Javascript to get HTTP Header variables

waleed atef
Greenhorn

Joined: Mar 18, 2011
Posts: 7
Dear All,

i need to know, if any one have a solution to help me in how to get header variable using javascript.

Thanks,

Waleed Atef
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

Which ones? Some are made available through built-in objects. But there is no general mechanism to get response headers. Unless, of course, you are asking about an Ajax response (but I don't get that impression).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
waleed atef
Greenhorn

Joined: Mar 18, 2011
Posts: 7
i mean that how to get header parameter from javascript code like java.

My question here, it's doable or not.

Thanks alot for your response.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If Ajax call yes, if normal page load, no.

If normal page load, have Java write it to the page.
If Ajax, read the spec.

Eric
waleed atef
Greenhorn

Joined: Mar 18, 2011
Posts: 7
Dear

I've appended param in firefox header tool and i want to read it through javascript code, so can any one provide me an example on it.

Thanks,

Waleed Atef
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Previous answer still applies.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use Javascript to get HTTP Header variables