While it's possible to get the browser's User-Agent in Javascript via navigator.userAgent
, is it likewise possible to get the browser's Accept
header without performing a HTTP request?
Reading browser's Accept header in Javascript
Asked Answered
© 2022 - 2024 — McMap. All rights reserved.
navigator.userAgent
example. On the server-side, it would come through as the request headerHTTP_ACCEPT
. It's not looking good (as in possible) anyways and doesn't fit the original application I was going to use it for so this may be a closed door at this point. – LabouredAccept
header from JavaScript. I need to make an AJAX fetch request using the exactAccept
header that the browser usually sends by default when it requests a webpage. – Compton