<?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>144132</bug_id>
          
          <creation_ts>2015-04-23 16:55:19 -0700</creation_ts>
          <short_desc>Web Inspector: reopening inspector doesn&apos;t reload files from disk unless inspected page changes</short_desc>
          <delta_ts>2026-01-12 09:09:37 -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>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</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>
          
          <blocked>147066</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Brian Burg">burg</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>darin</cc>
    
    <cc>graouts</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>jonowells</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1088099</commentid>
    <comment_count>0</comment_count>
    <who name="Brian Burg">burg</who>
    <bug_when>2015-04-23 16:55:19 -0700</bug_when>
    <thetext>Steps to reproduce:

1. Add console.log(&quot;123&quot;) to the end of WebInspector.contentLoaded.
2. Build and open the inspector for some page
3. 123 is printed
4. Change console.log(&quot;123&quot;) to &quot;456&quot;
5. Build, close, and reopen the inspector
6. 123 is printed again.

Expected behavior:

Step 6 should print 456 to the console, but stale copies of the interface are picked up.

This works as expected if you close the inspector, navigate to a different page, and open the inspector. It also works if you open the 2nd level inspector.

My guess is that we are holding onto the inspector WKWebView for some time to reduce re-open latency, but not reloading the resources in that case. Or, there is some sort of cache configuration bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088100</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-04-23 16:55:39 -0700</bug_when>
    <thetext>&lt;rdar://problem/20677296&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088401</commentid>
    <comment_count>2</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-04-24 16:39:06 -0700</bug_when>
    <thetext>The out of process stuff added a webViewCloseTimeout to WebInspectorProxyMac. It is 60 seconds. Within 60 seconds we will reuse the WKWebView to avoid slow process creation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088474</commentid>
    <comment_count>3</comment_count>
    <who name="Brian Burg">burg</who>
    <bug_when>2015-04-24 21:27:25 -0700</bug_when>
    <thetext>Right. I am wondering if we need to explicitly reload the inspector if we reuse the existing webview in platformCreateInspectorPage(). I need to debug this further.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088485</commentid>
    <comment_count>4</comment_count>
    <who name="Brian Burg">burg</who>
    <bug_when>2015-04-24 22:57:57 -0700</bug_when>
    <thetext>We issue a new navigation every time the inspector is opened, whether it was reused or a new view.

    m_inspectorPage-&gt;loadRequest(URL(URL(), m_underTest ? inspectorTestPageURL() : inspectorPageURL()));

I don&apos;t believe it should be using cached versions of the files. I need to turn on the network logging spew and reproduce to see what it thinks it is doing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088838</commentid>
    <comment_count>5</comment_count>
    <who name="Brian Burg">burg</who>
    <bug_when>2015-04-26 14:30:43 -0700</bug_when>
    <thetext>I guess setting ResourceCachePolicy on request (accessed using a loader client) is the easiest way to go for now. Using a meta tag can get Main.html to be revalidated/evicted from cache, but none of the subresources are (and they have no HTTP headers because they are local files).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144600</commentid>
    <comment_count>6</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2015-11-27 10:24:19 -0800</bug_when>
    <thetext>Apparently it reloads with revalidation if using window.location.reload(), but window.history.go(0) and internal WebCore commands don&apos;t. Not sure what&apos;s up with that, but I guess I&apos;ll close this bug. Here&apos;s the log spew:

CachedResourceLoader::determineRevalidationPolicy reloading due to missing cache validators.
Evicting resource 0x11e85db00 for &apos;file:///Users/bburg/repos/webkit-tot/OpenSource/WebKitBuild/Debug/WebInspectorUI.framework/Resources/Views/BezierEditor.css&apos; from cache
Loading CachedResource for &apos;file:///Users/bburg/repos/webkit-tot/OpenSource/WebKitBuild/Debug/WebInspectorUI.framework/Resources/Views/BezierEditor.css&apos;.
MemoryCache::add Added &apos;file:///Users/bburg/repos/webkit-tot/OpenSource/WebKitBuild/Debug/WebInspectorUI.framework/Resources/Views/BezierEditor.css&apos;, resource 0x1309ae900
ResourceLoadScheduler::load resource 0x1309aeec0 &apos;file:///Users/bburg/repos/webkit-tot/OpenSource/WebKitBuild/Debug/WebInspectorUI.framework/Resources/Views/BezierEditor.css&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1144601</commentid>
    <comment_count>7</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2015-11-27 10:25:39 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Apparently it reloads with revalidation if using window.location.reload(),
&gt; but window.history.go(0) and internal WebCore commands don&apos;t. Not sure
&gt; what&apos;s up with that, but I guess I&apos;ll close this bug. Here&apos;s the log spew:
&gt; 
&gt; CachedResourceLoader::determineRevalidationPolicy reloading due to missing
&gt; cache validators.
&gt; Evicting resource 0x11e85db00 for
&gt; &apos;file:///Users/bburg/repos/webkit-tot/OpenSource/WebKitBuild/Debug/
&gt; WebInspectorUI.framework/Resources/Views/BezierEditor.css&apos; from cache
&gt; Loading CachedResource for
&gt; &apos;file:///Users/bburg/repos/webkit-tot/OpenSource/WebKitBuild/Debug/
&gt; WebInspectorUI.framework/Resources/Views/BezierEditor.css&apos;.
&gt; MemoryCache::add Added
&gt; &apos;file:///Users/bburg/repos/webkit-tot/OpenSource/WebKitBuild/Debug/
&gt; WebInspectorUI.framework/Resources/Views/BezierEditor.css&apos;, resource
&gt; 0x1309ae900
&gt; ResourceLoadScheduler::load resource 0x1309aeec0
&gt; &apos;file:///Users/bburg/repos/webkit-tot/OpenSource/WebKitBuild/Debug/
&gt; WebInspectorUI.framework/Resources/Views/BezierEditor.css&apos;

So, we can issue that reload command if reopening the warmed-up inspector WKWebView. I guess that is a separate bug from adding a Reload menu item, worth fixing (but less urgent).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>