<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>140201</bug_id>
          
          <creation_ts>2015-01-07 13:51:09 -0800</creation_ts>
          <short_desc>Provide public API to control persistent data in WKWebView</short_desc>
          <delta_ts>2020-02-19 00:19:21 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eugene But">eugenebut</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dieter</cc>
    
    <cc>krzysztof.modras</cc>
    
    <cc>m.goleb+bugzilla</cc>
    
    <cc>mjs</cc>
    
    <cc>rniwa</cc>
    
    <cc>stefan</cc>
    
    <cc>stuartmorgan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1059506</commentid>
    <comment_count>0</comment_count>
    <who name="Eugene But">eugenebut</who>
    <bug_when>2015-01-07 13:51:09 -0800</bug_when>
    <thetext>Chrome for iOS allows for multiple profiles, which require separating all persistent storage and state between the different profiles. This includes things HTML5 localStorage and visited links, which WKWebView doesn&apos;t appear to provide any API for.

The functionality appears to exist; WKWebViewConfigurationPrivate.h has both _setVisitedLinkProvider: and _setWebsiteDataStore:, which sound like exactly what is needed to implement these features correctly.

As it is, Chrome for iOS can only implement a partial profile separation, which leads to some amount of bleed of data and state between profiles, when, e.g., a site uses localStorage.

Steps to Reproduce:
1. Try to implement multiple profiles in a WKWebView-based browser
2. See state bleed between profiles</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1059605</commentid>
    <comment_count>1</comment_count>
    <who name="Eugene But">eugenebut</who>
    <bug_when>2015-01-07 16:02:47 -0800</bug_when>
    <thetext>Radar ID: 17580422</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287236</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2017-03-13 10:35:13 -0700</bug_when>
    <thetext>Fixed in https://bugs.webkit.org/show_bug.cgi?id=140198 and https://bugs.webkit.org/show_bug.cgi?id=140200.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1591536</commentid>
    <comment_count>3</comment_count>
    <who name="Eugene But">eugenebut</who>
    <bug_when>2019-11-19 08:31:11 -0800</bug_when>
    <thetext>As of iOS13, WKWebsiteDataStore supports multiple non-persistent data stores, but only one persistent data store. Desktop and Android Chrome supports multiple persistent profiles, which is important use case for enterprise. iOS 13 has a nice multi window feature, and it would be great to allow a separate persistent profile in each window.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1603442</commentid>
    <comment_count>4</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2020-01-06 21:27:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/58363841&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1603908</commentid>
    <comment_count>5</comment_count>
    <who name="Stefan Arentz">stefan</who>
    <bug_when>2020-01-07 18:52:44 -0800</bug_when>
    <thetext>To be more concrete: our request is to be able to create multiple persistent WKWebsiteDataStore instances, given a root path or profile name.

All the infrastructure for this seems to be available through the two classes that WKWebsiteDataStore delegates work to:

WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h
WebKit/UIProcess/WebsiteData/WebsiteDataStore.h

The configuration maintains many paths to the various databases and cache directories. I think it is fine for that being an internal implementation detail, as long as we can construct a WKWebsiteDataStore with either a root path or profile name.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>