MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Feature]: Cookies are not rememberred?

Open
#4,876 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Describe the feature/enhancement you need

I created my own web view using MSWebView2 (Win32/C++), but I noticed the cookies are not remembered each time I open up a new WebView2 interface. I looked at the SDK document and didn't find a clue how to tell WebView2 to preserve cookies or discard cookies.

For example I'm testing by navigating my MSWebView2 using https://setcookie.net/, I can set my cookie "aaa=bbb", the cookie is gone if I close my MSWebView2 and re-create a new view, (my application is still opened)

I'm not quite sure if this is an un-supported feature or may be I'm not initializing my MSWebView2 in a correct way? In my opinion, MSWebView2 should preserve the cookie when a new instance is created, and it should give client an API option to "not using cookies" during the construction.

The scenario/use case where you would use this feature

Just generic browsing

How important is this request to you?

Impactful. My app's user experience would be significantly compromised without it.

Suggested implementation

I'm not quite sure if this is an un-supported feature or may be I'm not initializing my MSWebView2 in a correct way? In my opinion, MSWebView2 should preserve the cookie when a new instance is created, and it should give client an API option to "not using cookies" during the construction.

What does your app do? Is there a pending deadline for this request?

My application does web-based sign in.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are mentioned. Start by reviewing the WebView2 SDK documentation and the lifecycle of the MSWebView2 instances described in the report. Done would mean determining whether cookies can persist across recreated views and defining an API option for preserving or disabling them.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.