Ticket #15988: 0003-Update-speculative-connect-behavior-from-testing-res.patch

File 0003-Update-speculative-connect-behavior-from-testing-res.patch, 3.7 KB (added by mikeperry, 3 years ago)

Third patch in the series, with updates based on testing results (applies on top of the other two).

  • design-doc/design.xml

    From 1baa076e18a030fe8300515bc088d6dbe3a3cfbb Mon Sep 17 00:00:00 2001
    From: Mike Perry <mikeperry-git@torproject.org>
    Date: Thu, 9 Mar 2017 18:31:12 -0500
    Subject: [PATCH 3/3] Update speculative connect behavior from testing results.
    
    ---
     design-doc/design.xml | 33 ++++++++++++++++++---------------
     1 file changed, 18 insertions(+), 15 deletions(-)
    
    diff --git a/design-doc/design.xml b/design-doc/design.xml
    index 9c86403..7a2a08e 100644
    a b This functionality is part of a 
    16201620Firefox provides the feature to <ulink url="https://www.igvita.com/2015/08/17/eliminating-roundtrips-with-preconnect/">connect speculatively</ulink> to
    16211621remote hosts if that is either indicated in the HTML file (e.g. by
    16221622<ulink url="https://w3c.github.io/resource-hints/">link
    1623 rel="preconnect" and others</ulink>) or otherwise deemed beneficial.
     1623rel="preconnect" and rel="prefetch"</ulink>) or otherwise deemed beneficial.
    16241624
    16251625      </para>
    16261626      <para>
    16271627
    1628 Mozilla has disabled speculative connections where a proxy is used (see <ulink
     1628Firefox does not support rel="prerender", and Mozilla has disabled speculative
     1629connections and rel="preconnect" usage where a proxy is used (see <ulink
    16291630url="https://trac.torproject.org/projects/tor/ticket/18762#comment:3"> comment
    1630 3 in bug 18762</ulink> for further details). Explicit preconnects via the
    1631 <command>rel</command> attribute are still performed, however.
     16313 in bug 18762</ulink> for further details). Explicit prefetching via the
     1632<command>rel="prefetch"</command> attribute are still performed, however.
    16321633
    16331634      </para>
    16341635      <para><command>Design Goal:</command>
    16351636
    16361637All pre-loaded links and speculative connections MUST be isolated to the URL
    1637 bar domain. This includes isolating both Tor circuit use, as well as the
    1638 caching and associate browser state for the prefetched resource.
     1638bar domain, if enabled. This includes isolating both Tor circuit use, as well
     1639as the caching and associate browser state for the prefetched resource.
    16391640
    16401641      </para>
    16411642      <para><command>Implementation Status:</command>
    16421643
    1643 For automatic speculative connects, we leave them disabled as per the Mozilla
    1644 default for proxy settings. However, if enabled, they will be isolated to the
    1645 proper first party Tor circuit by the same mechanism as is used for HTTP
    1646 Keep-alive. For explicit speculative connects via rel, we isolate them <ulink
     1644For automatic speculative connects and rel="preconnect", we leave them
     1645disabled as per the Mozilla default for proxy settings. However, if enabled,
     1646speculative connects will be isolated to the proper first party Tor circuit by
     1647the same mechanism as is used for HTTP Keep-alive. For rel="prefetch", we
     1648isolate them <ulink
    16471649url="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.7.0esr-6.5-1&amp;id=80c53022a40aaf9d9def7dc04ee200c9b9ba78fd">via
    16481650this patch</ulink>. This isolation makes both preconnecting and cache warming
    1649 via rel=prefetch and rel=prerender ineffective for links to domains other than
    1650 the current URL bar domain. For links to the same domain as the URL bar
    1651 domain, the full cache warming benefit is obtained. As an optimization, any
    1652 preconnecting to domains other than the current URL bar domain can thus be
    1653 disabled (perhaps with the exception of frames), but we do not do this.
     1651via rel=prefetch ineffective for links to domains other than the current URL
     1652bar domain. For links to the same domain as the URL bar domain, the full cache
     1653warming benefit is obtained. As an optimization, any preconnecting to domains
     1654other than the current URL bar domain can thus be disabled (perhaps with the
     1655exception of frames), but we do not do this. We allow these requests to
     1656proceed, but we isolate them.
    16541657
    16551658      </para>
    16561659