homepage Welcome to WebmasterWorld Guest from 54.167.174.90
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
BBC's Crazy Javascript
83.9kb
vincevincevince

WebmasterWorld Senior Member vincevincevince us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3636102 posted 9:27 am on Apr 27, 2008 (gmt 0)

BBC News (new design) 83.9kb across 19 javascript files. That's just one page.

Interesting extract from one of the files [news.bbc.co.uk]:
/*

an overly long list of variables - could well be reduced

// */

 

Receptional Andy



 
Msg#: 3636102 posted 9:41 am on Apr 27, 2008 (gmt 0)

3000 or so lines of CSS and over 100 images per page seems a bit excessive to me too ;)

Still, it's clear from the various different coding styles that a diverse range of people have worked on this at varying times, so it's little wonder there's not much in the way of cohesion. Doesn't look like they even use gzip, either.

pageoneresults

WebmasterWorld Senior Member pageoneresults us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3636102 posted 12:23 pm on Apr 27, 2008 (gmt 0)

I've seen much heavier than that. They have 359 html errors on the home page alone, that is uncalled for. Page weighs in at...

HTML 2 78,706 26.2%
CSS 5 22,778 7.6%
Scripts 13 71,960 24.0%
XML 0 0 0.0%
Images 33 108,678 36.2%
CSS Images 29 17,862 6.0%
Multimedia 0 0 0.0%
Other 0 0 0.0%
Total 82 299,984 100%

Text to HTML Ratio: 5.95%

vincevincevince

WebmasterWorld Senior Member vincevincevince us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3636102 posted 1:43 pm on Apr 27, 2008 (gmt 0)

Why are major outlets now putting out these kinds of page? Is because of greater broadband adoption that they just can't be bothered not to?

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3636102 posted 2:22 pm on Apr 27, 2008 (gmt 0)

The BBC site has to be ranked among one of the largest in existence, so many people must work on it there's no real way to keep track of each part of it.

If you do a "site:www.bbc.co.uk" in Google it reports 15,200,000 pages!

As for HTML errors, I imagine they use some sort of centralized WYSIWYG to handle it all, so blame that.

As for the "an overly long list of variables - could well be reduced", while amusing, it's easy to understand that whoever originally wrote or controls that list now doesn't know which variables are or aren't used somewhere so can risk removing anything without breaking somebody else's code.

I think that's the unfortunate inevitability with a site that's just sooo big.

As for 83k, it would take about 300ms to download on most UK broadband connections, the entire homepage loaded in under 1 second on my laptop here.

I think what's important to note is their good use of web technology, mainly HTML with small inserts of DHTML, AJAX and flash. Just noted a nice little flash clock on the main page. The site is structured well, loads fast, flows smoothly, and is compatible (unable to test this assumtion) with all platforms and mobile devices.

But more importantly as you navigate the site, there are no javascript errors which is more than I can say for a lot of sites with relatively little js.

That said, I think that makes it an extremely good site.

[edit]
No, I don't work for the BBC! Nor have I studied the code structure, I was just trying to view the site as an end user would.
[/edit]

[edited by: Dabrowski at 2:24 pm (utc) on April 27, 2008]

appi2

5+ Year Member



 
Msg#: 3636102 posted 2:42 pm on Apr 27, 2008 (gmt 0)

Just noted a nice little flash clock on the main page

I found that strange, it's a bit like when you first learn about the date function. Oooh I'll make a clock for my blog.
What is the point of that! Show me a computer without the time.
tis pretty though ;)

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3636102 posted 5:26 pm on Apr 27, 2008 (gmt 0)

Show me a computer without the time.
tis pretty though ;)

I think it caught my eye 'cos it's analogue. And it just looks nice, and fits in with the design. It doesn't look like it was an afterthought.

topr8

WebmasterWorld Senior Member topr8 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3636102 posted 6:21 pm on Apr 27, 2008 (gmt 0)

well i'm assuming the clock shows bbc time, eg uk time which is useful, given that the site is used all over the world and some of the stories have a time on them, also the radio broadcasts and so on are listed in uk time, so if you want to listen (i asume that is possible overseas) then knowing the time could be handy.

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3636102 posted 2:36 pm on Apr 28, 2008 (gmt 0)

well i'm assuming the clock shows bbc time, eg uk time which is useful

Errrr, don't know as I'm in the UK. Maybe someone elsewhere you check that?

ectect

10+ Year Member



 
Msg#: 3636102 posted 3:47 pm on Apr 28, 2008 (gmt 0)

It shows local time, not BBC time - would have been handy otherwise.

Isn't it more like a throwback to when the BBC used a clock like that just before the 9'clock news?

j_h_maccann

10+ Year Member



 
Msg#: 3636102 posted 4:04 pm on Apr 28, 2008 (gmt 0)

... there are no javascript errors which is more than I can say for a lot of sites with relatively little js.

The BBC's knowledge of Javascript has improved recently.

For years their radio player (now called iPlayer) suffered from huge memory leaks--just let it play, no user interaction, and it would exhaust all of memory, requiring a restart--pretty poor for a radio!

But since the new version of iPlayer, perhaps a couple of months ago, memory leaks have disappeared.

netchicken1

5+ Year Member



 
Msg#: 3636102 posted 7:26 pm on Apr 28, 2008 (gmt 0)

That green does nothing for the website either. Its an odd color to use.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved