<?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>134692</bug_id>
          
          <creation_ts>2014-07-07 13:47:41 -0700</creation_ts>
          <short_desc>Add API for saving and restoring a WKWebView&apos;s _WKSessionState</short_desc>
          <delta_ts>2020-07-06 02:56:25 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</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="Anders Carlsson">andersca</reporter>
          <assigned_to name="Anders Carlsson">andersca</assigned_to>
          <cc>beidson</cc>
    
    <cc>benjamin</cc>
    
    <cc>danyao</cc>
    
    <cc>dieter</cc>
    
    <cc>fpatel</cc>
    
    <cc>ivan.hantov</cc>
    
    <cc>kc</cc>
    
    <cc>martijn</cc>
    
    <cc>sam</cc>
    
    <cc>stefan</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1020896</commentid>
    <comment_count>0</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2014-07-07 13:47:41 -0700</bug_when>
    <thetext>Add API for saving and restoring a WKWebView&apos;s _WKSessionState</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1094153</commentid>
    <comment_count>1</comment_count>
    <who name="Stefan Arentz">stefan</who>
    <bug_when>2015-05-12 07:00:25 -0700</bug_when>
    <thetext>Would this state also include the WKBackForwardList ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1101447</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-06-11 16:44:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/21349869&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1158660</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-01-25 18:54:06 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Would this state also include the WKBackForwardList ?

Yes, it would.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1317054</commentid>
    <comment_count>4</comment_count>
    <who name="Ivan Hantov">ivan.hantov</who>
    <bug_when>2017-06-08 14:27:43 -0700</bug_when>
    <thetext>It would (In reply to Brady Eidson from comment #3)
&gt; (In reply to comment #1)
&gt; &gt; Would this state also include the WKBackForwardList ?
&gt; 
&gt; Yes, it would.

Please do fix this. Or at least make the backForwardList readwrite. It is now impossible to restore the state of the WKWebView when the app starts. There&apos;s many proposed hacks, but none works really well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1669011</commentid>
    <comment_count>5</comment_count>
    <who name="Martijn Walraven">martijn</who>
    <bug_when>2020-07-06 02:56:25 -0700</bug_when>
    <thetext>I hope this is the right issue to revive discussion around session state restoration for WKWebView. 

I recently asked Brady Eidson about exposing the existing private _WKSessionState API on Twitter, and he mentioned more work would be needed to design a better API for this (https://twitter.com/bradeeoh/status/1278359540551933952?s=20):

&gt; Hi! We know developers have uses for this type of API, and as such it&apos;s on our roadmap.
&gt; It&apos;s not nearly as simple as exposing that SPI, which is *not* something we&apos;re proud of and would dread supporting in perpetuity.

Not sure what the right process for this is, but I&apos;d love to find a way to help make progress on this issue. Since this seems to be a long standing issue and I&apos;m new to the project, I&apos;m sure there&apos;s a lot of context I&apos;m missing.

What problems with the existing API have kept it from being made public? What direction are people thinking in for redesigning it?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>