<?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>82291</bug_id>
          
          <creation_ts>2012-03-26 20:40:45 -0700</creation_ts>
          <short_desc>Pages containing &quot;multipart/x-mixed-replace&quot; resources should not be cached.</short_desc>
          <delta_ts>2012-03-28 19:57:44 -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>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Chris.Guan">logingx</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>rwlbuis</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>588525</commentid>
    <comment_count>0</comment_count>
    <who name="Chris.Guan">logingx</who>
    <bug_when>2012-03-26 20:40:45 -0700</bug_when>
    <thetext>If a page has multiparts with &quot;multipart/x-mixed-replace&quot;, we should not cache it in pageCache.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588584</commentid>
    <comment_count>1</comment_count>
      <attachid>133981</attachid>
    <who name="Chris.Guan">logingx</who>
    <bug_when>2012-03-26 23:03:47 -0700</bug_when>
    <thetext>Created attachment 133981
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588744</commentid>
    <comment_count>2</comment_count>
      <attachid>133981</attachid>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2012-03-27 04:19:56 -0700</bug_when>
    <thetext>Comment on attachment 133981
Patch

LGTM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588773</commentid>
    <comment_count>3</comment_count>
      <attachid>133981</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-27 04:55:22 -0700</bug_when>
    <thetext>Comment on attachment 133981
Patch

Clearing flags on attachment: 133981

Committed r112252: &lt;http://trac.webkit.org/changeset/112252&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588775</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-27 04:55:50 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>589264</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-03-27 14:14:45 -0700</bug_when>
    <thetext>This patch has no explanation of why this is desirable, and no regression test. Is this something all platforms need, or something all other platforms already have?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>589668</commentid>
    <comment_count>6</comment_count>
    <who name="Chris.Guan">logingx</who>
    <bug_when>2012-03-27 22:56:42 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; This patch has no explanation of why this is desirable, and no regression test. Is this something all platforms need, or something all other platforms already have?

&quot;multipart/x-mixed-replace&quot; is HTTP server push. If we stored them in Page Cache, some images( most of cases) can not show up on back/forward. I also checked other platforms, QT does not support &quot;multipart/x-mixed-replace&quot;, Chrome has own pageCache management, Mac has the issue with &quot;multipart/x-mixed-replace&quot; on back/forward. I have not a strong power to unify them:). So I would like take this as a specific platform issue to fix it so far.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590089</commentid>
    <comment_count>7</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-03-28 10:18:32 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; This patch has no explanation of why this is desirable, and no regression test. Is this something all platforms need, or something all other platforms already have?
&gt; 
&gt; &quot;multipart/x-mixed-replace&quot; is HTTP server push. If we stored them in Page Cache, some images( most of cases) can not show up on back/forward. 

Not clear what you&apos;re trying to say here.

I think what you&apos;re saying is that if we cache such a page, we&apos;d stopAllLoaders therefore cutting off the stream to the image.  Then when the page is restored the user would just see the most recent frame rendered before the loaders were stopped.  Is that correct?

&gt;QT does not support &quot;multipart/x-mixed-replace&quot;

But if they ever add support, they will have this bug.  Correct?

&gt; Chrome has own pageCache management

Currently they simply have no page cache.  They&apos;re experimenting with enabling the WebCore page cache now and - when they do - they could presumably be affected.

&gt;Mac has the issue with &quot;multipart/x-mixed-replace&quot; on back/forward.

The same issue as Blackberry?  Therefore this fix should be applied to Mac also?

&gt; I have not a strong power to unify them:). 

There is nothing &quot;blackberry specific&quot; about this bug.  This bug exists for &quot;platforms that use the page cache that also support multipart/x-mixed-replace&quot;.  That current includes Blackberry, Mac, and Windows.  Chrome is experimenting with joining that club by enabling the page cache.  If Qt ever supports multipart/x-mixed-replace they will also join that club.

You don&apos;t have to make Chrome support the page cache or make Qt support multipart/x-mixed-replace to fix this bug.  You just have to fix it cross-platform in a way they can benefit from in the future.

Also - since this is a cross platform bug and is something that is testable in the layout tests - this patch should include a regression test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590091</commentid>
    <comment_count>8</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-03-28 10:19:22 -0700</bug_when>
    <thetext>Reopening because this is a cross platform bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590093</commentid>
    <comment_count>9</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-03-28 10:19:41 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Reopening because this is a cross platform bug.

...that wasn&apos;t fixed properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590115</commentid>
    <comment_count>10</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-03-28 10:38:22 -0700</bug_when>
    <thetext>To add a further point of clarification on the very premise of this bug:

In general we should work to fix any exemption to the page cache on a case-by-case basis.

Some of the reasons a page can&apos;t be cached are policy decisions: HTTPS with certain caching headers, for example.  We have to maintain those exemptions to keep financial institutions happy, for example.

But *many* reasons on the list of exemptions are *current* technical shortcomings that we should strive to solve.

This &quot;multipart/x-mixed-replace&quot; issue is a technical one.  Currently we have no acceptable solution for caching such a page then restoring it: Images would be frozen mid-frame, for example.

But there are clever solutions we implement in the future.  Replace the image with a paused frame that could be gracefully resumed automatically or by explicit user action to re-establish the network connection, for example.

Once we get this bug resolved in a proper cross platform manner we need to make sure to have a bug tracking &quot;Remove the multipart/x-mixed-replace exemption by gracefully allowing such resources in the page cache&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590122</commentid>
    <comment_count>11</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2012-03-28 10:43:28 -0700</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=47222 is quite relevant</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590747</commentid>
    <comment_count>12</comment_count>
    <who name="Chris.Guan">logingx</who>
    <bug_when>2012-03-28 19:08:15 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; To add a further point of clarification on the very premise of this bug:
&gt; 
&gt; In general we should work to fix any exemption to the page cache on a case-by-case basis.
&gt; 
&gt; Some of the reasons a page can&apos;t be cached are policy decisions: HTTPS with certain caching headers, for example.  We have to maintain those exemptions to keep financial institutions happy, for example.
&gt; 
&gt; But *many* reasons on the list of exemptions are *current* technical shortcomings that we should strive to solve.
&gt; 
&gt; This &quot;multipart/x-mixed-replace&quot; issue is a technical one.  Currently we have no acceptable solution for caching such a page then restoring it: Images would be frozen mid-frame, for example.
&gt; 
&gt; But there are clever solutions we implement in the future.  Replace the image with a paused frame that could be gracefully resumed automatically or by explicit user action to re-establish the network connection, for example.
&gt; 
&gt; Once we get this bug resolved in a proper cross platform manner we need to make sure to have a bug tracking &quot;Remove the multipart/x-mixed-replace exemption by gracefully allowing such resources in the page cache&quot;

Thanks a lot. It is reasonable and I understood.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>133981</attachid>
            <date>2012-03-26 23:03:47 -0700</date>
            <delta_ts>2012-03-27 04:55:22 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-82291-20120327140341.patch</filename>
            <type>text/plain</type>
            <size>2432</size>
            <attacher name="Chris.Guan">logingx</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTEyMjA3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L2Js
YWNrYmVycnkvQ2hhbmdlTG9nIGIvU291cmNlL1dlYktpdC9ibGFja2JlcnJ5L0NoYW5nZUxvZwpp
bmRleCAxOTdmYTJjZTZlNzQxNTNlMGJmMGZjOTE2MzMzN2U1OTdjYjhhYmE5Li5hNmYxMzA3MDg5
NDk3YTgxMTcwNmQyZTJhNWMyMGEzOTVjZmYxZmFkIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
L2JsYWNrYmVycnkvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJLaXQvYmxhY2tiZXJyeS9DaGFu
Z2VMb2cKQEAgLTEsMyArMSwxOCBAQAorMjAxMi0wMy0yNiAgQ2hyaXMgR3VhbiAgPGNocmlzLmd1
YW5AdG9yY2htb2JpbGUuY29tLmNuPgorCisgICAgICAgIEEgcGFnZSBjb250YWluaW5nIG11bHRp
cGFydHMgd2l0aCAibXVsdGlwYXJ0L3gtbWl4ZWQtcmVwbGFjZSIgc2hvdWxkIG5vdCBiZSBjYWNo
ZWQuCisgICAg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