0

I currently have a login page set up where it sends a HTTP post request to the server and then in a response message it redirects me to another page on the server. On that page I want to access the location header which contains a value that I need to perform future work with my server. Is there anyway to read that location header from the response so that I can get the value?

I know that you can access headers if you sent an ajax request by using the XMLHttpRequest object in the callback! But I am not using ajax so I cannot do that?

Thanks so much!

1 Answers1

0

No, that information is not available. For a complete explanation, see Accessing the web page's HTTP Headers in JavaScript.

Your best bet would be to have the server put the information somewhere on the new page where you can retrieve it, e.g. a hidden field.

Community
  • 1
  • 1