Developer: Dump JavaScript for faster Web loading

23.03.2015
Web pages would be loaded quicker sans JavaScript via a proposal being floated by the editor of a fashion magazine, possibly as part of a still-theoretical "HTML6."

A W3C (World Wide Web Consortium) mailing list post entitled "HTML6 proposal for single-page Web apps without JavaScript" details the proposal, dated March 20. "The overall purpose [of the plan] is to reduce response times when loading Web pages," said Web developer Bobby Mozumder, editor in chief of FutureClaw magazine, in an email. "This is the difference between a 300ms page load vs 10ms. The faster you are, the better people are going to feel about using your Website."

The proposal cites a standard design pattern emerging via front-end JavaScript frameworks where content is loaded dynamically via JSON APIs. "This is the single-page app Web design pattern," said Mozumder. "Everyone's into it because the responsiveness is so much better than loading a full page -- 10-50ms with a clean API load vs. 300-1500ms for a full HTML page load. Since this is so common now, can we implement this directly in the browsers via HTML so users can dynamically run single-page apps without JavaScript"

Accomplishing the goal of a high-speed, responsive Web experience without loading JavaScript "could probably be done by linking anchor elements to JSON/XML (or a new definition) API endpoints [and] having the browser internally load the data into a new data structure," the proposal states. The browser "then replaces DOM elements with whatever data that was loaded as needed." The initial data and standard error responses could be in header fixtures, which could be replaced later if so desired. "The HTML body thus becomes a templating language with all the content residing in the fixtures that can be dynamically reloaded without JavaScript."

JavaScript frameworks and JavaScript are leveraged for loading now, but there are issues with these, Mozumder explained. "Should we force millions of Web developers to learn JavaScript, a framework, and an associated templating language if they want a speedy, responsive Web site out-of-the-box This is a huge barrier for beginners, and right now they're stuck with slower full-page reloads." The plan translates to simpler and less-costly advanced Web development, according to Mozumder.

As far as the "HTML6" designation, Ian Jacobs, who is a representative of the W3C, said he was unaware of any plans for anything branded HTML6. He pointed to a working draft for HTML5.1, published March 17, as a specification under consideration post-HTML5. Mozumder said he merely put the proposal out for early feature consideration and was unsure of any plans for HTML6. "I expect this [proposal] to take years to develop, but if this can be incorporated into HTML5.1, then great, even better!"  

(www.infoworld.com)

Paul Krill

Zur Startseite