1

I want to know how can we obtain the cookies of the current page being accessed using a communication link between the content script and background page. This is for an extension.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user782400
  • 1,617
  • 7
  • 30
  • 51

1 Answers1

1

You can use Content Scripts to access document.cookie for each website you visit. Then you can use Message Passing to pass the cookies from your Content Script to your Background Page.

There are many examples on Stack Overflow for example:

Community
  • 1
  • 1
Mohamed Mansour
  • 39,445
  • 10
  • 116
  • 90
  • I have created a script and a background page but seem to work rite since nothing is there in the console when i run the extension – user782400 Jun 05 '11 at 20:10