Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Is opening an unfocused pinned tab to get updated cookies from a website allowed?

50 views
Skip to first unread message

Prakhar Tiwari

unread,
Dec 5, 2024, 9:18:20 AM12/5/24
to Chromium Extensions
Hello there, 

In my chrome extension, I need to get updated cookies from a website twice a day for some features to work. But unfortunately those cookies come in existence/update only when the user opens that website's page. Now if the user never opens the site, I won't be able to get the cookie. So to tackle that problem, I am implementing a solution to a open an unfocused pinned tab to have minial interruption on the user side and wait check for the cookie to be received and then immediately close the tab. This will happen twice a day.

Now, is any of this unethical or against the policies of Webstore? I need to make sure before moving ahead so that my extension don't get into trouble.

Regards

Prakhar Tiwari

unread,
Dec 5, 2024, 9:22:03 AM12/5/24
to Chromium Extensions, Prakhar Tiwari
Also, I am having issues with another option I wanted to try.

Is it possible to open a hidden window? Like a minimized "normal" chrome window with that website's URL, or an unfocused "popup" type window?
Because after a lot of tries, the window opens on the top every time and interrupts the user.

Patrick Kettner

unread,
Dec 5, 2024, 9:32:03 AM12/5/24
to Prakhar Tiwari, Chromium Extensions
We can't approve anything other than final code, but that behavior sounds acceptable based on what you have described. That being said, I would suggest using an offscreenDocument instead.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/560c73a9-a9ce-4dff-8c00-29c63e4405c4n%40chromium.org.

Prakhar Tiwari

unread,
Dec 5, 2024, 10:03:30 AM12/5/24
to Chromium Extensions, Patrick Kettner, Chromium Extensions, Prakhar Tiwari
Does an offscreen document give us the cookie for that website? Because I tried it and failed to get a cookie, if you could share any examples or resources that would be very helpful.
I am unsure how to load up the website and get the cookie with the offscreen doc. 

Patrick Kettner

unread,
Dec 5, 2024, 10:34:46 AM12/5/24
to Prakhar Tiwari, Chromium Extensions
An offscreen document is just what it says on the tin - a document that is offscreen. If the user is logged in, and cookies are set, you would get them the same way you would get them on the web.
Reply all
Reply to author
Forward
0 new messages