If you are using ASP .NET MVC and you want to get the Accepted-Languages header from JavaScript then here is a workaround example that does not involve any asynchronous requests.
In your .cshtml file, store the header securely in a div's data- attribute:
Then your JavaScript code can access the info, e.g. using JQuery:
Of course you can use a similar approach with other server technologies as others have mentioned.