Welcome to WebmasterWorld Guest from 54.224.194.28

Forum Moderators: open

Message Too Old, No Replies

BBC's Crazy Javascript

83.9kb

     
9:27 am on Apr 27, 2008 (gmt 0)

Senior Member from MY 

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

joined:Apr 1, 2003
posts:4847
votes: 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

// */
9:41 am on Apr 27, 2008 (gmt 0)

Senior Member

joined:Jan 27, 2003
posts:2534
votes: 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.

12:23 pm on Apr 27, 2008 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts: 12169
votes: 55


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%

1:43 pm on Apr 27, 2008 (gmt 0)

Senior Member from MY 

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

joined:Apr 1, 2003
posts:4847
votes: 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?
2:22 pm on Apr 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 29, 2007
posts:1147
votes: 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]

2:42 pm on Apr 27, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 17, 2005
posts:432
votes: 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 ;)
5:26 pm on Apr 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 29, 2007
posts:1147
votes: 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.

6:21 pm on Apr 27, 2008 (gmt 0)

Senior Member

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

joined:Apr 19, 2002
posts:3181
votes: 9


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.
2:36 pm on Apr 28, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 29, 2007
posts:1147
votes: 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?

3:47 pm on Apr 28, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 22, 2003
posts:178
votes: 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?

4:04 pm on Apr 28, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 26, 2002
posts:111
votes: 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.

7:26 pm on Apr 28, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:May 27, 2005
posts:614
votes: 0


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