Aug. 16th, 2016

akuklev: (ДР Цертуса 2011)
The most annoying thing about HTML is how much boilerplate HTML documents used to inevitably contain. Introduction of custom tags in HTML5 helped a lot, but there is still one thing which cannot be mitigated: each document starts with containing lots of technical stuff like styles, scripts, favicons and meta parameters, and typically also some kind of headers, footers and navigation elements.

If I were asked for one single improvement of HTML I desire most, it would be the mechanism to reduce all these boilerplate to a single tag <!BASE /path/to/preamble> in the very beginning of the document. The document referenced by the /path/to/preamble is assumed to be a normal HTML(5+) document, containing additional tag <content/>, a placeholder to be substituted by the content of the proper document.

Since HTTP/2.0 Server Push is now generally supported, this feature would not introduce any latency or bandwidth overhead. In the cases when Cache Aware Server Push is supported, this approach conserves bandwidth, and improves load latency, because the preamble (which is often shared by multiple documents and rarely changed) can be cached, which means that (except for the first time when browser encounters the preamble) only pure content is transmitted over the line.

If we also were to allow to specify a script for preprocessing the content, we could deliver content in humane languages like Markdown and YAML:
my-server.com/blog/2012-07-11:
  <!BASE ./blog-entry.base>
  § HTML improvement I desire most
  
  The most _annoying_ thing about HTML is how much boilerplate
  ...

my-server.com/blog/blog-entry.base:
  <!DOCTYPE html>
  <html>
    ... // lots of stuff
    <content process={brewMarkdown}/>
    ... // footer, etc
  </html>

December 2016

S M T W T F S
    123
456789 10
11121314151617
18192021222324
25262728293031

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 19th, 2017 06:54 pm
Powered by Dreamwidth Studios