Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5982707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:07:31+00:00 2026-05-22T22:07:31+00:00

Is it possible HTTP Accept headers using only javascript? I know using PHP I

  • 0

Is it possible HTTP Accept headers using only javascript? I know using PHP I would do something like this $_SERVER['HTTP_ACCEPT'], but as far as I can tell javascript doesn’t have this.

Perhaps I could do something with an XmlHttpRequest?

Any help would be awesome!

Thanks,
Mike

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:07:32+00:00Added an answer on May 22, 2026 at 10:07 pm

    RE: “The headers sent to the server.”

    You could echo them back out in the server’s response, and get them that way.

    IE.) On a web-page you could make a hidden form field with the value, or pop the value into the javascript that gets emited from the page.

    From a web service, you could include the value of the incoming header in part of the outgoing XML or JSON.

    If you’re using XmlHttpRequest, you could send a header back to the client with this value.

    Possibilities are endless.

    I’m dubious of why this would ever be useful though. The client should know what it’s expecting before it requests it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, I would like to know if it's possible to detect by HTTP headers
With PHP, is it possible to send HTTP headers with file_get_contents() ? I know
Is it possible to make such buttons ( http://img225.imageshack.us/img225/6452/buttonslw9.jpg ) using CSS? It should
Is it possible to do a HTTP Head request solely using an XMLHTTPRequest in
Is it possible to set a cookie for http://www.example.com from a PHP file located
Is it possible to use a custom HTTP VERB, like MERGE, with jQuery.ajax()? I'm
I like the pattern I saw in this blog post ( http://marekblotny.blogspot.com/2009/04/conventions-after-rewrite.html ), where
Thanks in advance... i m using this code for set http header in http
Where can I find all the possible content notations for the following HTTP headers?
I'm looking into a restful design and would like to use the HTTP methods

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.