- Cookie is a special type of HTTP header.
- Javascript can retrieve all cookies for the current page (e.g. https://stackoverflow.com/a/3400787/418439).
- However, it is not possible to retrieve the header of the current
page
(Accessing the web page's HTTP Headers in JavaScript) unless making another request.
Why it is designed in this way? Due to security concern?