Bug 257434

Summary: iFrame not saving settings after restart of application.
Product: WebKit Reporter: Genefy <genefy>
Component: FramesAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: beidson, bfulgham, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: PC   
OS: Linux   

Description Genefy 2023-05-27 20:05:52 PDT
When changing a setting on an site - Example: Setting Dark mode on a subdomain within an iFrame, Webkit is not able to save this setting between sessions. 
If I go to the subdomain directly and change the setting, It is able to remain saved across reboots.
Example sites: Organizr as the main site with Homarr as the iFrame (dark mode option on the hamburger menu)
Comment 1 John Wilander 2023-05-29 22:08:26 PDT
Hi! What technology are you using to “save” here? WebKit partitions HTML storage per top frame site and partitioned storage is ephemeral. Ephemeral means in-memory-only.
Comment 2 John Wilander 2023-05-29 22:09:40 PDT
Actually partitioned per top frame *origin*.
Comment 3 Genefy 2023-05-30 06:01:32 PDT
I'm using save in a figurative sense. I'm mostly just choosing the dark mode option.
Then closing and re-opening a web app/& standard web (using webkit) with iFrames in them. But when going across the iFrames those manually set to dark mode are being reset.

I'm using iFrames because it's a control panel. (Organizr)
Can iFrames be saved too? Or at least a preference to be saved?
Comment 4 John Wilander 2023-05-30 07:43:31 PDT
Could you provide a code snippet of how you save dark mode in the iframe, please?
Comment 5 Radar WebKit Bug Importer 2023-06-03 20:06:17 PDT
<rdar://problem/110220728>
Comment 6 Genefy 2023-06-03 22:06:47 PDT
There's a hamburger menu on the top right, 3 lines. if you click the 3 lines, there's an option that says Switch to Dark Mode.

There's a demo site for homarr: https://demo.homarr.dev/
Again just hamburger menu on the top right. Thank you for following up.

The only difference is that homarr would be within an iFrame.