<p>For more than a decade the Web has used XMLHttpRequest (XHR) to achieve asynchronous requests in JavaScript. While very useful, XHR is not a very nice API. It suffers from lack of separation of concerns. The input, output and state are all managed by interacting with one object, and state is tracked using events. Also, the event-based model doesn’t play well with JavaScript’s recent focus on Promise- and generator-based asynchronous programming.</p>
<p>The <ahref="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a> intends to fix most of these problems. It does this by introducing the same primitives to JS that are used in the HTTP protocol. In addition, it introduces a utility function <code>fetch()</code> that succinctly captures the intention of retrieving a resource from the network.</p>
<p>The <ahref="https://fetch.spec.whatwg.org">Fetch specification</a>, which defines the API, nails down the semantics of a user agent fetching a resource. This, combined with ServiceWorkers, is an attempt to:</p>
<p>The <ahref="https://fetch.spec.whatwg.org/">Fetch specification</a>, which defines the API, nails down the semantics of a user agent fetching a resource. This, combined with ServiceWorkers, is an attempt to:</p>
<ol>
<li>Improve the offline experience.</li>
<li>Expose the building blocks of the Web to the platform as part of the <ahref="https://extensiblewebmanifesto.org/">extensible web movement</a>.</li>
<li>“response”: naturally, for Headers obtained from Response (<code>Response.headers</code>).</li>
<li>“immutable”: Mostly used for ServiceWorkers, renders a Headers object <br/>read-only.</li>
</ul>
<p>The details of how each guard affects the behaviors of the Headers object are <br/>in the <ahref="https://fetch.spec.whatwg.org">specification</a>. For example, you may not append or set a “request” guarded Headers’ “Content-Length” header. Similarly, inserting “Set-Cookie” into a Response header is not allowed so that ServiceWorkers may not set cookies via synthesized Responses.</p>
<p>The details of how each guard affects the behaviors of the Headers object are <br/>in the <ahref="https://fetch.spec.whatwg.org/">specification</a>. For example, you may not append or set a “request” guarded Headers’ “Content-Length” header. Similarly, inserting “Set-Cookie” into a Response header is not allowed so that ServiceWorkers may not set cookies via synthesized Responses.</p>
<p>All of the Headers methods throw TypeError if <code>name</code> is not a <ahref="https://fetch.spec.whatwg.org/#concept-header-name">valid HTTP Header name</a>. The mutation operations will throw TypeError if there is an immutable guard. Otherwise they fail silently. For example:</p>
"excerpt":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p>
<p> Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p>
"excerpt":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\n quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p>
<p> Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p>
<h3>Prepared by <ahref="http://www.vcu.edu/engweb">Ann
<h3>Prepared by <ahref="http://www.vcu.edu/engweb">Ann
Woodlief,</a> Virginia Commonwealth University</h3>
<h5>Click on text in red for hypertext notes and questions</h5> I am a rather elderly man. The nature of my avocations for the last thirty years has brought me into more than ordinary contact with what would seem an interesting and somewhat singular set of men of whom as yet nothing that I know of has ever been written:-- I mean the law-copyists or scriveners. I have known very many of them, professionally and privately, and if I pleased, could relate divers histories, at which good-natured gentlemen might smile, and sentimental souls might weep. But I waive the biographies of all other scriveners for a few passages in the life of Bartleby, who was a scrivener the strangest I ever saw or heard of. While of other law-copyists I might write the complete life, of Bartleby nothing of that sort can be done. I believe that no materials exist for a full and satisfactory biography of this man. It is an irreparable loss to literature. Bartleby was one of those beings of whom nothing is ascertainable, except from the original sources, and in his case those are very small. What my own astonished eyes saw of Bartleby, that is all I know of him, except, indeed, one vague report which will appear in the sequel.
<p>Ere introducing the scrivener, as he first appeared to me, it is fit I make some mention of myself, my employees, my business, my chambers, and general surroundings; because some such description is indispensable to an adequate understanding of the chief character about to be presented. </p>
<divid="readability-page-1"class="page"><span>[<ahref="http://fakehost/test/../html/" title="Document search and retrieval page">Docs</a>] [<ahref="https://tools.ietf.org/id/draft-dejong-remotestorage-04.txt"title="Plaintext version of this document">txt</a>|<ahref="http://fakehost/pdf/draft-dejong-remotestorage-04.txt"title="PDF version of this document">pdf</a>] [<ahref="https://datatracker.ietf.org/doc/draft-dejong-remotestorage"title="IESG Datatracker information for this document">Tracker</a>] [<ahref="mailto:draft-dejong-remotestorage@tools.ietf.org?subject=draft-dejong-remotestorage%20"title="Send email to the document authors">Email</a>] [<ahref="http://fakehost/rfcdiff?difftype=--hwdiff&url2=draft-dejong-remotestorage-04.txt"title="Inline diff (wdiff)">Diff1</a>] [<ahref="http://fakehost/rfcdiff?url2=draft-dejong-remotestorage-04.txt"title="Side-by-side diff">Diff2</a>] [<ahref="http://fakehost/idnits?url=https://tools.ietf.org/id/draft-dejong-remotestorage-04.txt"title="Run an idnits check of this document">Nits</a>] </span><br/><span></span><br/><span>Versions: <ahref="http://fakehost/test/draft-dejong-remotestorage-00">00</a><ahref="http://fakehost/test/draft-dejong-remotestorage-01">01</a><ahref="http://fakehost/test/draft-dejong-remotestorage-02">02</a><ahref="http://fakehost/test/draft-dejong-remotestorage-03">03</a><ahref="http://fakehost/test/draft-dejong-remotestorage-04">04</a></span><br/><span></span><br/>
<divid="readability-page-1"class="page"><span>[<ahref="http://fakehost/html/" title="Document search and retrieval page">Docs</a>] [<ahref="https://tools.ietf.org/id/draft-dejong-remotestorage-04.txt"title="Plaintext version of this document">txt</a>|<ahref="http://fakehost/pdf/draft-dejong-remotestorage-04.txt"title="PDF version of this document">pdf</a>] [<ahref="https://datatracker.ietf.org/doc/draft-dejong-remotestorage"title="IESG Datatracker information for this document">Tracker</a>] [<ahref="mailto:draft-dejong-remotestorage@tools.ietf.org?subject=draft-dejong-remotestorage%20"title="Send email to the document authors">Email</a>] [<ahref="http://fakehost/rfcdiff?difftype=--hwdiff&url2=draft-dejong-remotestorage-04.txt"title="Inline diff (wdiff)">Diff1</a>] [<ahref="http://fakehost/rfcdiff?url2=draft-dejong-remotestorage-04.txt"title="Side-by-side diff">Diff2</a>] [<ahref="http://fakehost/idnits?url=https://tools.ietf.org/id/draft-dejong-remotestorage-04.txt"title="Run an idnits check of this document">Nits</a>] </span><br/><span></span><br/><span>Versions: <ahref="http://fakehost/test/draft-dejong-remotestorage-00">00</a><ahref="http://fakehost/test/draft-dejong-remotestorage-01">01</a><ahref="http://fakehost/test/draft-dejong-remotestorage-02">02</a><ahref="http://fakehost/test/draft-dejong-remotestorage-03">03</a><ahref="http://fakehost/test/draft-dejong-remotestorage-04">04</a></span><br/><span></span><br/>
@ -71,11 +71,11 @@ RPMs</a>, and it sucks about the same as mplayer, and in about the same ways, th
<ul><i>
Have you considered changing distributions?
</i></ul>
<p> Yes, every single time I try something like this, I very seriously consider <ahref="http://fakehost/test/../gruntle/bittybox.html">getting a Mac</a>. </p>
<p> Yes, every single time I try something like this, I very seriously consider <ahref="http://fakehost/gruntle/bittybox.html">getting a Mac</a>. </p>
<p> Really the only thing that's stopping me is that I fear the <ahref="http://www.xemacs.org/">Emacs situation</a>. </p>
<p> (By which I mean, ``Lack of a usable version thereof.'' No, running RMSmacs inside a terminal window doesn't qualify. Nor does running an X server on the Mac: if I were going to switch, why in the world would I continue inflicting the X Windows Disaster on myself? Wouldn't getting away from that be the <i>whole
point?</i>) </p>
<ul><spansize="-1"> (I understand there is an almost-functional Aqua version of <ahref="http://fakehost/test/../hacks/why-cooperation-with-rms-is-impossible.mp3">
<ul><spansize="-1"> (I understand there is an almost-functional Aqua version of <ahref="http://fakehost/hacks/why-cooperation-with-rms-is-impossible.mp3">
RMSmacs</a> now. I'll probably check it out at some point, but the problem with <i><ahref="http://fakehost/test/lemacs.html">me</a></i> switching from XEmacs to RMSmacs is that it would probably result in another <ahref="http://slashdot.org/article.pl?sid=03/01/24/1440207">
Slashdork</a> post, meaning I'd wake up to another 150+ poorly spelled flames in my inbox... I'm hoping for a Aquafied XEmacs, but I know that's not likely to happen any time soon.)</span></ul>
<p> By the way, the suggestion to switch Linux distrubutions in order to get a single app to work might sound absurd at first. And that's because <ahref="http://fakehost/test/linux.html">it is</a>. But I've been saturated with Unix-peanut-gallery effluvia for so long that it no longer even surprises me when every
@ -83,5 +83,5 @@ RPMs</a>, and it sucks about the same as mplayer, and in about the same ways, th
<nobr>simple --</nobr> results in someone suggesting that you either A) patch your kernel or B) change distros. It's inevitable and inescapable, like Hitler. </p>
</blockquote>
<hr/>
<p><ahref="http://fakehost/test/../"><imgalt="[ up ]"src="http://fakehost/test/../compass1.gif" onmouseover="this.src="../compass2.gif""onmouseout="this.src="../compass1.gif""/></a></p>
<p><ahref="http://fakehost/"><imgalt="[ up ]"src="http://fakehost/compass1.gif" onmouseover="this.src="../compass2.gif""onmouseout="this.src="../compass1.gif""/></a></p>
Would you like to be part of the Fandom team? <ahref="http://fandom.wikia.com/fan-contributor"data-is="trackable"riot-tag="trackable">Join our Fan Contributor Program</a> and share your voice on <ahref="http://fandom.wikia.com" data-is="trackable"riot-tag="trackable">Fandom.com</a>! </em>
Would you like to be part of the Fandom team? <ahref="http://fandom.wikia.com/fan-contributor"data-is="trackable"riot-tag="trackable">Join our Fan Contributor Program</a> and share your voice on <ahref="http://fandom.wikia.com/" data-is="trackable"riot-tag="trackable">Fandom.com</a>! </em>