From the server, in addition to the main content in response to an Ajax request, can I also send my additional HTTP headers for further use in JavaScript?
For example: I have an HTML page, in JavaScript code an Ajax request is made to a PHP script. The PHP script, via the header () function, produces some additional HTTP header, and I use it in JavaScript.
Is there an example of such an interaction?
Which HTTP headers can I use for my purposes - i.e. to transfer from PHP the data I need in JavaScript besides the main response to the request?