Fossil SCM

It turns out we already have javascript.md, with similar aims, so now it's a matter of integrating this doc into that one.

stephan 2020-08-19 08:40 UTC js-policy-doc
Commit 2e131efc87c5948600f9e6aca940f500a38d087426dcb050c7834f4364e45ebc
1 file changed +10 -10
+10 -10
--- www/js-policy.md
+++ www/js-policy.md
@@ -25,11 +25,11 @@
2525
2626
- To provide asynchronous communication between the client and the
2727
server, commonly known as "ajax" or "XHR" communication. This allows
2828
certain pages to operate more quickly and fluidly by avoiding
2929
complete round-trips to and from the server. Perhaps
30
- counter-intuitively, the increase JS load such pages typically
30
+ counter-intuitively, the increased JS load such pages typically
3131
require costs less bandwidth than is saved via using ajax traffic
3232
instead of conventional HTML forms.
3333
3434
- To implement, or reimplement, certain editing-centric features with
3535
a degree of interactivity which is impossible to duplicate in purely
@@ -48,17 +48,17 @@
4848
1. "It's increases the size of the page download."
4949
- For the fossil pages which make heavy use of JS, the initial page
5050
transfer size may increase: 6-8kb (compressed) is typical, and it
5151
may even go up to a whopping 15kb (as of this writing, it's 8kb
5252
compressed on our most JS-intensive page (`/fileedit`), and only
53
- 25kb uncompressed and unobfuscated). With fossil's newer (summer 2020)
53
+ 25kb uncompressed). With fossil's newer (summer 2020)
5454
JS delivery mechanism and etags-related caching
5555
improvements, such JS can be served with a single HTTP request and
5656
cached by browsers for up to a year. Additionally, most pages
5757
which use that much JS also use comparitively lightweight ajax
5858
communication to eliminate page reloads and enable data-loss-free
59
- recovery in certain error cases which would lose client-side edits
59
+ recovery in certain error cases which could lose client-side edits
6060
in a non-JS-powered page. The end result is that the aggregate
6161
cost of such pages is actually *lower* than their static
6262
counterparts, and the total bytes of JS "overhead" is equal to
6363
only 1-2 full round-trip requests of the equivalent static pages.
6464
@@ -78,11 +78,11 @@
7878
[default CSP](defcsp.md) prohibits execution of JS code which is
7979
delivered from anywhere but the fossil server which delivers the
8080
page.
8181
8282
3. "It's slow."
83
- - It *was*, before September 2008. Google's introduction [of their
83
+ - It *was*, before September 2008. Google's introduction of [their
8484
V8 JS engine][v8] taught the world that JS need not be slow, and
8585
the JS engines used by every modern browser have been improved
8686
upon by leaps and bounds to keep them competitive with Google's
8787
engine. Nowadays JS is, as a rule, astoundingly fast. As the world
8888
continues to move more and more to web-based applications
@@ -90,16 +90,16 @@
9090
their engines fast and competitive.
9191
9292
[v8]: https://en.wikipedia.org/wiki/V8_(JavaScript_engine)
9393
9494
4. "Cross-browser compatibility is poor."
95
- - It *most certainly was*. Starting around 2006/2007, when jQuery
96
- literally revolutionized how people worked with and thought about
97
- JS, there has been a massive industry-level push behind it and
98
- compatibility has become the norm rather than the exception.
99
- Cross-browser JS compatibility issues which affect web developers
100
- are, by and large, a thing of the past.
95
+ - It *most certainly was*. Since 2006/2007, when jQuery literally
96
+ revolutionized how people worked with and thought about JS, there
97
+ has been a massive industry-level push behind it and compatibility
98
+ has become the norm rather than the exception. Cross-browser JS
99
+ compatibility issues which affect web developers are, by and
100
+ large, a thing of the past.
101101
102102
5. "The UI works fine without it."
103103
- True, for *some* definition of "works." Modern times and modern
104104
tools call for modern solutions. While we don't claim to be
105105
cutting-edge technologists, the days of when static HTML
106106
--- www/js-policy.md
+++ www/js-policy.md
@@ -25,11 +25,11 @@
25
26 - To provide asynchronous communication between the client and the
27 server, commonly known as "ajax" or "XHR" communication. This allows
28 certain pages to operate more quickly and fluidly by avoiding
29 complete round-trips to and from the server. Perhaps
30 counter-intuitively, the increase JS load such pages typically
31 require costs less bandwidth than is saved via using ajax traffic
32 instead of conventional HTML forms.
33
34 - To implement, or reimplement, certain editing-centric features with
35 a degree of interactivity which is impossible to duplicate in purely
@@ -48,17 +48,17 @@
48 1. "It's increases the size of the page download."
49 - For the fossil pages which make heavy use of JS, the initial page
50 transfer size may increase: 6-8kb (compressed) is typical, and it
51 may even go up to a whopping 15kb (as of this writing, it's 8kb
52 compressed on our most JS-intensive page (`/fileedit`), and only
53 25kb uncompressed and unobfuscated). With fossil's newer (summer 2020)
54 JS delivery mechanism and etags-related caching
55 improvements, such JS can be served with a single HTTP request and
56 cached by browsers for up to a year. Additionally, most pages
57 which use that much JS also use comparitively lightweight ajax
58 communication to eliminate page reloads and enable data-loss-free
59 recovery in certain error cases which would lose client-side edits
60 in a non-JS-powered page. The end result is that the aggregate
61 cost of such pages is actually *lower* than their static
62 counterparts, and the total bytes of JS "overhead" is equal to
63 only 1-2 full round-trip requests of the equivalent static pages.
64
@@ -78,11 +78,11 @@
78 [default CSP](defcsp.md) prohibits execution of JS code which is
79 delivered from anywhere but the fossil server which delivers the
80 page.
81
82 3. "It's slow."
83 - It *was*, before September 2008. Google's introduction [of their
84 V8 JS engine][v8] taught the world that JS need not be slow, and
85 the JS engines used by every modern browser have been improved
86 upon by leaps and bounds to keep them competitive with Google's
87 engine. Nowadays JS is, as a rule, astoundingly fast. As the world
88 continues to move more and more to web-based applications
@@ -90,16 +90,16 @@
90 their engines fast and competitive.
91
92 [v8]: https://en.wikipedia.org/wiki/V8_(JavaScript_engine)
93
94 4. "Cross-browser compatibility is poor."
95 - It *most certainly was*. Starting around 2006/2007, when jQuery
96 literally revolutionized how people worked with and thought about
97 JS, there has been a massive industry-level push behind it and
98 compatibility has become the norm rather than the exception.
99 Cross-browser JS compatibility issues which affect web developers
100 are, by and large, a thing of the past.
101
102 5. "The UI works fine without it."
103 - True, for *some* definition of "works." Modern times and modern
104 tools call for modern solutions. While we don't claim to be
105 cutting-edge technologists, the days of when static HTML
106
--- www/js-policy.md
+++ www/js-policy.md
@@ -25,11 +25,11 @@
25
26 - To provide asynchronous communication between the client and the
27 server, commonly known as "ajax" or "XHR" communication. This allows
28 certain pages to operate more quickly and fluidly by avoiding
29 complete round-trips to and from the server. Perhaps
30 counter-intuitively, the increased JS load such pages typically
31 require costs less bandwidth than is saved via using ajax traffic
32 instead of conventional HTML forms.
33
34 - To implement, or reimplement, certain editing-centric features with
35 a degree of interactivity which is impossible to duplicate in purely
@@ -48,17 +48,17 @@
48 1. "It's increases the size of the page download."
49 - For the fossil pages which make heavy use of JS, the initial page
50 transfer size may increase: 6-8kb (compressed) is typical, and it
51 may even go up to a whopping 15kb (as of this writing, it's 8kb
52 compressed on our most JS-intensive page (`/fileedit`), and only
53 25kb uncompressed). With fossil's newer (summer 2020)
54 JS delivery mechanism and etags-related caching
55 improvements, such JS can be served with a single HTTP request and
56 cached by browsers for up to a year. Additionally, most pages
57 which use that much JS also use comparitively lightweight ajax
58 communication to eliminate page reloads and enable data-loss-free
59 recovery in certain error cases which could lose client-side edits
60 in a non-JS-powered page. The end result is that the aggregate
61 cost of such pages is actually *lower* than their static
62 counterparts, and the total bytes of JS "overhead" is equal to
63 only 1-2 full round-trip requests of the equivalent static pages.
64
@@ -78,11 +78,11 @@
78 [default CSP](defcsp.md) prohibits execution of JS code which is
79 delivered from anywhere but the fossil server which delivers the
80 page.
81
82 3. "It's slow."
83 - It *was*, before September 2008. Google's introduction of [their
84 V8 JS engine][v8] taught the world that JS need not be slow, and
85 the JS engines used by every modern browser have been improved
86 upon by leaps and bounds to keep them competitive with Google's
87 engine. Nowadays JS is, as a rule, astoundingly fast. As the world
88 continues to move more and more to web-based applications
@@ -90,16 +90,16 @@
90 their engines fast and competitive.
91
92 [v8]: https://en.wikipedia.org/wiki/V8_(JavaScript_engine)
93
94 4. "Cross-browser compatibility is poor."
95 - It *most certainly was*. Since 2006/2007, when jQuery literally
96 revolutionized how people worked with and thought about JS, there
97 has been a massive industry-level push behind it and compatibility
98 has become the norm rather than the exception. Cross-browser JS
99 compatibility issues which affect web developers are, by and
100 large, a thing of the past.
101
102 5. "The UI works fine without it."
103 - True, for *some* definition of "works." Modern times and modern
104 tools call for modern solutions. While we don't claim to be
105 cutting-edge technologists, the days of when static HTML
106

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button