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

  • SEARCH
  • Home
  • 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 8622927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:09:56+00:00 2026-06-12T07:09:56+00:00

I am developing a Chrome extension that makes XMLHttpRequest’s on various sites but I

  • 0

I am developing a Chrome extension that makes XMLHttpRequest’s on various sites but I notice that my browser ignores the field “withCredentials”. Whether this is set to true or false, the response is always the same and contains the web page as it was requested by a simple url navigation through the browser.

Manifest:

"background": {
    "scripts": ["jquery.min.js", "daemon.js"],
    "persistent": true
},
"permissions": [
    "<all_urls>"
]

Inside daemon.js:

var xhr = new XMLHttpRequest();
xhr.open("GET", 'http://stackoverflow.com/', true);
xhr.withCredentials = false;
xhr.onload = function(e) {
    $('body').html(xhr.responseText);
}
xhr.send();

This will return stackoverflow.com being loaded with my username inside some DOM element despite setting withCredentials to false. My questions are:

  1. Is this a working as intended behavior?
  2. If yes, is there a workaround for this? Making http requests from inside an extension but ignoring cookies or other session information? (UPDATE: ignoring all credential information like client-side certificates or http authentication)

I’m using latest (22.0.1229.79 m) Chrome.

  • 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-06-12T07:09:57+00:00Added an answer on June 12, 2026 at 7:09 am

    Yes, this (the action of credentials being sent) is intended behaviour. The XMLHttpRequest level 2 specification #withCredentials says (it’s the last line of the section):

    The withCredentials attribute has no effect when fetching same-origin resources.

    Apparently, code run in Chrome extension’s context with sufficient permissions (manifest file) cause the property to behave the same as if the request was made from the same origin.

    I’ve checked if fetching the request from the background page solved anything, and concluded that it does not help. If the other site supports CORS (through headers), then the solution is to not mention the site at the "permissions" section of the manifest file.
    All of the other options are highlighted in this answer.

    If none of the methods are satisfying, then the answer to question two is “No, there is no workaround”.

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

Sidebar

Related Questions

I'm developing a Google Chrome extension that makes heavy use of the context menu,
I'm developing an extension for Google Chrome that generates an mp3 file and saves
I'm developing a Chrome extension that ships jQuery and jquery is referenced from the
I'm developing an extension in Chrome 4 (currently 4.0.249.0) that will show the user's
I'm developing an extension for Google Chrome browser. I could not figure out how
I tried looking for a Chrome extension that does this, but was unsuccessful in
I'm developing a Chrome extension and I'm wondering is there a way that I
I am developing a chrome extension that runs some javascript on a particular web
I am developing a Chrome extension that needs to package an XML file (a
We are developing a chrome extension that has auto-updating capability. When the extension is

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.