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 6097561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:03:29+00:00 2026-05-23T13:03:29+00:00

I have a background page in a Chrome extension that makes requests to a

  • 0

I have a background page in a Chrome extension that makes requests to a server. By using Chrome’s debugging tools I can see that various Set-Cookie headers are returned. However, subsequent requests do not contain these cookies – Chrome seems to throw them away. This results in each request made to the server being counted as a new session.

Server-side I have the following headers set:

header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Credentials: true");

Client-side I have withCredentials = true set on the XMLHttpRequest object.

I also have the address of the server within the permissions section of the extension manifest.

I feel that I’m very close to a solution here – the server is responding with the correct headers but I can’t quite work out why Chrome decides not to store the cookies.

Is there something else I need to set in the headers, XMLHttpRequest object or manifest? Or is this just not possible?

  • 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-23T13:03:29+00:00Added an answer on May 23, 2026 at 1:03 pm

    I finally worked this one out. The trick is to put the “cookies” permission into the extension manifest. That’s not obvious because the Chrome Extension documentation states only that it’s required if you’re using the chrome.cookies API – I’m not.

    You also have to enable third party cookies. So I may need a totally different solution as enabling third party cookies is not something I want to be recommending.

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

Sidebar

Related Questions

Suppose we have Chrome extension, that uses background page, popup page, maybe some other
I have an extension that communicates with another extension's background page to get weather
I have written a very simple Chrome extension. It consists of this background page:
I have a page that uses a background image to do rounded corners, and
While creating a Google Chrome extension, I have code that must remain in a
I'm writing a Chrome extension, in my background.html page, it is injecting a js
I'm using the new CSS3 spec background-size to have a background image that slightly
My chrome extension needs to send requests to a server on my home LAN,
I have written a Chrome extension that adds a char counter to some input
Happy new year :) I have a Chrome extension which is a popup that

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.