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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21319</bug_id>
          
          <creation_ts>2013-03-18 11:34:35 +0000</creation_ts>
          <short_desc>appcache: How compression should affect quotas</short_desc>
          <delta_ts>2013-10-23 22:15:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#downloading-or-updating-an-application-cache</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2014 Q4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>wintersnight</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84557</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-03-18 11:34:35 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html
Multipage: http://www.whatwg.org/C#downloading-or-updating-an-application-cache
Complete: http://www.whatwg.org/c#downloading-or-updating-an-application-cache

Comment:
There is no direction in the spec as to how compressed resources should be
treated. If cached resources are served compressed, they should be stored
compressed locally to reduce the size of the cache.

Posted from: 78.33.9.2
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84558</commentid>
    <comment_count>1</comment_count>
    <who name="">wintersnight</who>
    <bug_when>2013-03-18 11:42:05 +0000</bug_when>
    <thetext>My specific example is http://www.offlinebible.com/offline.html. After downloading all resources (about 10Mb over the wire) the Application Cache ends up being around 32Mb. I think this is because while I&apos;m serving the resources GZipped, this preference isn&apos;t preserved in the cache.

There may be a worthwhile debate about whether certain MIME types should automatically be compressed transparently by the browser implementation of the AppCache interface. Also, any decompression could either be done before the resource is &quot;served&quot; to the browser, or the resource could be &quot;served&quot; to the browser GZipped, as the original resource was (presumably using the browser network stack to decompress rather than duplicating this functionality behind the appcache interface).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85305</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-01 19:24:15 +0000</bug_when>
    <thetext>This should be completely transparent to the user and author, although I agree that it might affect how much of the quota is used.

Not sure exactly what to put in the spec about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86165</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-14 07:03:46 +0000</bug_when>
    <thetext>In particular, consider the following cases:

 - an appcache pointing to a very small resource (a few bytes).
 - an appcache pointing to a resource that&apos;s just 10GB of 0x00 bytes.
 - an appcache pointing to a resource that&apos;s served compressed to a very small
   size, but would decompress to 10GB of 0x00 bytes.
 - an appcache pointing to a resource that&apos;s 10GB of incompressible noise.

Assume 10GB is far above the allowed default quota. Which should trigger a message to the user, and which should not?

It&apos;s not just an implementation detail, because regardless of what the precise quota is, some will trigger a warning (or failure) and some won&apos;t.

I&apos;m thinking that we should probably suggest that quotas are based on uncompressed sizes, not compressed sizes. That way, a slight change to the compressibility of a file won&apos;t affect whether it fits or not, and it won&apos;t matter if the browser is doing its own compression or not.

Any opinions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95267</commentid>
    <comment_count>4</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-10-23 22:15:38 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8241.
Check-in comment: Suggest that quotas be based on uncompressed sizes, since the alternatives are more abusable and less predictable for authors and users
http://html5.org/tools/web-apps-tracker?from=8240&amp;to=8241</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>