Linked by snydeq on Tue 16th Aug 2011 16:46 UTC
Web 2.0 InfoWorld's Peter Wayner discusses the 11 hard truths Web developers must accept in making the most of HTML5 -- especially those who are looking to leverage HTML5 in hopes of unseating native apps. 'The truth is, despite its powerful capabilities, HTML5 isn't the solution for every problem. Its additional features are compelling and will help make Web apps formidable competitors for native apps, but security issues, limitations of local data storage, synchonization challenges, and politics should have us all scaling back our expectations for the spec.'
Permalink for comment 485488
To read all comments associated with this story, please click here.
RE[5]: HTML 5 == Pointless Bloat
by Lennie on Wed 17th Aug 2011 10:24 UTC in reply to "RE[4]: HTML 5 == Pointless Bloat"
Member since:

Have a look at the source for OSnews' main page. It's just over 62 KiB and consists of a mixture of JavaScript and HTML. On top of that there's the CSS which is another 23.3 KiB, plus another little CSS for RSS (2.1 KiB). Then there's a total of 167.4 KiB of extra javascript files, where the largest is for jQuery. That's a total of 254.8 KiB of data (not including icons, pictures, etc). The content is only 19.3 KiB. How much of the remaining 235.5 KiB is there to control "look and feel"?

Now click on your browsers "refresh" button to refresh the OSNews main page. How long did it take to complete? For me it took a total of 8 seconds to drag all that data half way around the world, partly because the browser can't start fetching all the data at the same time (for e.g. it can't know which CSS file to download until after it's started decoding the HTML).

Ok. Now try to convince me that this is "efficient".

- Brendan

I won't try and convince you about it is efficiency.

Efficiency of webpages is something I deal with on a regular basis.

However I do want to point out a few things:

Yes, CSS-model isn't all that great. Downloading an extra file at the start of the page sucks. Especially if the system that makes the HTML doesn't properly flush the data.

But a few lines of CSS could apply to many, many different elements on the page and would not even need to be downloaded when going to different pages.

If you would include style information in each and every single tag individually you would be sending a lot more text on the wire.

Ofcourse if you would like to reduce the number of requests before the page renders you could include it in the head it would possibly be even faster.

I don't know why they included jquery on the page.

I'm also not happy that it is included at the top of the page. I would rather see any javascript at the bottom of the page. Preferably not even using a onDomReady event or similair. I doubt that is needed.

I also don't like it if people don't combine their seperate script files into one.

It seems pretty much no-one understand cache-headers these days. They don't include any headers to get the files cached at the side of the browser. OSNews used to care a lot about mobile, but downloading or atleast checking every browser-session. If files have changed seem like a bad idea to me, especially on mobile.

Or why they use as many cookies as they do. I count 40 (!). I also do not know why a static file should have a Set-Cookie-header.

Or why they sent headers for those same static files which prevent it from being cached at all by most browsers.

That makes no sense to me.

I'm sure Kroc (I think he does the part of the site you see in the browser) could tell us more about it if he would read this thread, maybe he would even fix it.

But I'm pretty sure he would be bored out of his mind before he got to my comment. ;-)

Anyway Kroc if you want any help, let me know.

I'm pretty sure OSNews could save on bandwidth and make pages load quicker if they change just a few things.

My guess is Kroc is a busy man. His HTML/CSS is usually pretty great he just needs to read a book by Steve Souders to get some tips on performance and slightly change his mindset.

Reply Parent Score: 2