I am adding a custom HTTP header
to a 204 - no content
response in PHP
:
header("Success: true");
http_response_code(204);
Question is how can I then read this header in JavaScript
?
Edit: Should have mentioned this is for the current page not an Ajax request. From what I can establish there is no way to access http headers from within Javascript so it looks like this is not possible.