Cookie-sharing in Opera extensions

Forums » Dev.Opera » Archived Article Discussions

This topic has been closed. No new entries allowed.

Reason: You can now post comments on articles on Dev Opera

Forum rules and guidelines

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

24. June 2011, 12:43:49

Opera Software

tagawa

Posts: 143

Cookie-sharing in Opera extensions

Opera 11.50 for desktop introduces the ability for extensions to share cookies with the browser. As tempting as it is to dive into puns about milk and biscuits, we're going to look at how this new feature can help you make extensions that are easier for people to use. And this feature also just happens to be easy for developers to use as well.

( Read the article )

24. June 2011, 16:20:38

timmi

Posts: 194

Works cookie-sharing only with iFrames or with every Request that a Extension can do? (XHR?, embed externals)
Newest Opera Final and Opera Next - YouTube Extension: YouWatch, jetzt auch auf Deutsch

27. June 2011, 07:17:03

Opera Software

tagawa

Posts: 143

Yes, it's not just iFrames - works with XHR, etc. as well.

28. June 2011, 06:49:47

Opera Software

tagawa

Posts: 143

Here's a Speed Dial extension that uses cookie sharing and XHR for getting data:
https://addons.opera.com/addons/extensions/details/reddit-on-speed-dial/

I've updated the article slightly to highlight this.

29. June 2011, 11:09:40

p09o

Posts: 8

Is it possible to get a cookie value from within an extension?

8. July 2011, 08:06:47

Opera Software

tagawa

Posts: 143

According to a (wiser than me) colleague, from an injected script you should have access to document.cookies.
Not from a background script, however, as this would effectively return cookies for the extension's own widget:// URL.

10. July 2011, 08:12:13

p09o

Posts: 8

Yeah, that won't work for me.
But i guess all i need to do is create a page that prints the cookie out and then just xhr it.

14. September 2011, 13:45:09

tomassplatch

Posts: 79

is it possible to disable cookies sharing? For example I want the Twitter extension to be logged into a different account then the browser...

https://addons.opera.com/en/addons/extensions/details/twitter-extension/

Forums » Dev.Opera » Archived Article Discussions