Well, having been involved with The TV Room here's my two-penn'orth.
1. Yes, I agree - the code is rather weighty and font and other style tags being opened and closed repeatedly is a waste of code space, and is very difficult to edit
HOWEVER - and this is a big HOWEVER
2. Websites with huge amounts of content to organise can very often produce code which is not as efficient as it could be. It's called "content management" and sometimes is a lot easier to perform if copy/paste/find/replace methods are used, unless of course you're a multinational publishing company who can spend a million quid or two getting a turnkey system produced.
I think Mike does an excellent job given that it's NOT his life's work, despite what many people obviously seem to think it is.
The problem is much code-generating software is abysmal. I think we're still in the infancy of the HTML world, as many page editors will continually generate something like <TAG VALUE="X"></TAG>Blah<P><TAG VALUE="X">Blah<P> rather than <TAG VALUE="X">Blah<P>Blah<P></TAG> because HTML is, by its very design, a blocky, serial horizontal/vertical wrap and table system. Everything has to be defined as lego blocks that fit together - unlike Flash you can't just say - "put this object in the middle of the screen" - you have to have padding of some sort to get it there.
You could say that it's more code-efficient to remove tags that set the same attribute to the same value, suspend further calls and leave the closing tags to appear only where those attributes then need to take on another value.
That's code efficient. But it's not 100% "compliant" in exactly the manner that the original HyperText Standards intend things to work, i.e. each element of a page is supposed to be coded-up as a discrete object which would appear the same way even if surrounding code chunks were removed. Code-efficient source makes this difficult and many page editors wouldn't, if tags were stripped-down, be able to resolve the necessary retention of attributes either side of a new object, if that new object was to have different values for those attributes. Because if each table cell or paragraph either side hasn't got it's font attributes or style attribute set, the whole thing will fall over because the closing tag to everything BEFORE the new object won't be found, and the original closing tag will be seen as a closing tag to the tags opened when creating the new object. So the necessary formatting will have to be re-applied to everything AFTER the new object too.
Remember too that HTML itself is forever changing - after all, where did CSS come from? I don't think that existed when HTML first came out - it has HAD to evolve because users constantly find themselves coming up to natural barriers in HTML that stop them from doing what they want to do in an easy to code way.
I get sick of people ranting on about HTML standards when, if it wasn't for the focus groups sitting down to talk about the latest round of changes that are going to be made to the standards, the standards now would still be the standards of 10 years ago and we'd all be viewing Ceefax-style web pages in XTerminal, using the cursor keys to move a square cursor over to the hyperlinks which would HAVE to be (because it used to be the standard) surrounded by square brackets and underlined with no choice of font.
they'll bothwork the same, but the first is esaier, and it only saves a pittance of bandwidth.
Also, by your reconing, surely a site without the "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">" rubbish, which still views the same, is better? I see HTML and HEAD tags going out the window soon...
Also the background colour of a web page should be definined in the style sheet, not in the body tag. tsk.
they'll bothwork the same, but the first is esaier, and it only saves a pittance of bandwidth.
Also, by your reconing, surely a site without the "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">" rubbish, which still views the same, is better? I see HTML and HEAD tags going out the window soon...
Also the background colour of a web page should be definined in the style sheet, not in the body tag. tsk.
Neither example would validate as HTML4 Transitional as type="text/javascript" is expected in the opening script tags, as for DOCTYPES i never get why they are so large.
Surley
<!DOCTYPE HTML 4.01T-EN> would be more efficent, with the dtd file being http://www.w3.org/TR/[the bit at the end 4.0T-EN.dtd], and when you are using a non-w3c dtd an optional element could be added - oh well!
With reference to my previous post, here's
one website
that'll eventually have major
headaches. It reject
ALL
non-MSIE browsers, with a very arrogant pro-IE message.
With reference to my previous post, here's
one website
that'll eventually have major
headaches. It reject
ALL
non-MSIE browsers, with a very arrogant pro-IE message.
If you browse the site in Mozzy, the message is in English
For the IE (l)users....
Quote:
Thank you for visting proffs.nu!
This web site looks great in the browser Microsoft Internet Explorer.
Either version 5.0 from 1999 or a later version.
Since 2002, estimates show that more than 90 % of all users are using one of these versions.
Using JavaScript and the fact that your browser understands it, we have come to the conclusion that you belong to the other 10%, and redirected you to this page. We have done so to remind you that your current browser is unable to make this web site look the way it should. proffs.nu contains ActiveX controls and other features that only work in Internet Explorer.
If you are unhappy with this, there are a number of things you can do.
1. Use the browser Microsoft Internet Explorer. Either version 5.0 or a later version. Good idea.
2. Disable the use of JavaScript in your current browser. Bad idea. This web site, like many other web sites, will loose a lot of its appeal when JavaScript is disabled.
3. Put the line
user_pref("general.useragent.override", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
in a user.js file (or whatever it is called in your current browser). Not so bad idea if your current browser is Netscape or Mozilla. Your browser will not be better than it was before, but it will be able to cheat web sites, including this one, and make them believe that you are using Microsoft Internet Explorer 6.0. Unfortunately, you will be cheating yourself as well. Your browser will still be unable to make this web site look the way it should. If you don't know what a user.js file is, read the manual.
4. Write to the makers of your current browser and ask them why it does not show web pages the same way Microsoft Internet Explorer 5.0 plus does. Since more than 90% of all users are using Microsoft Internet Explorer 5.0 plus, one would think that the propeller heads who make your current browser would take that into consideration. In particular, you could ask them why scripting and cascading style sheets, the two most important technologies for web designers, are treated so differently in their browser compared to Microsoft Internet Explorer 5.0 plus. If they answer, they may claim that they are on a mission from God or that their browser is more compliant with the recommendations of an organisation called the World Wide Web Consortium (rather impressive name or what?) Then you should ask them what they think is most important. Hundreds of millions of people using Microsoft Internet Explorer 5.0 plus or some mumbo jumbo organisation.
As soon as there is a sufficiently compatible alternative to Microsoft Internet Explorer, we will make sure that the alternative browser can be used here. To the best of our knowledge, there is no such alternative for the time being.
Once again, thank you for visiting.
The proffs.nu team
[EDIT]Any site using VB Script or Active X i wouldn't trust with a 10 foot bargepole![/EDIT]
I'm not a cunning linguist (!) but that website was brought to my attention was due to an online "hall of
shame" list of various other sites that reject non-IE browsers.The proffs.nu website stands out from all
the rest due to the extreme arrogance and stupidity of their pro-IE stance. They suggest useragent
spoofing, which is a very bad idea. They even have the sheer nerve to refer to the W3C as just
"some mumbo jumbo organization". IMHO, the morons behind the proffs.nu website simply
do NOT deserve to have a presence on the internet!
It is the most ludicrous message. Especially as it tells Mozilla users to spoof their UI string which defeats the purpose anyways.
Now lets get one this clear about the DOCTYPE "rubbish". If you have a doctype like
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
without a URL it won't make any difference to the rendering.
However both IE and Mozilla have two ways to render pages. "Quirks Mode" and "Standards mode".
If you have
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> with the URL it sends the browser into standards mode and renders "properly."
As I used a full XHTML doctype (I believe XHTML doctypes send IE and Moz into standards mode with or without a URL) it sent IE into standards mode. This meant that it rendered properly and not in the old style IE method hence it looking "bloody awful" as Mike said. So yes it does make a differerence.
Now on the broadband issue. There is an interview with the boss of sports site ESPN.com on Netscape's now defunct Development site.
Now this is a site that has millions of hits and according to him just changing the code on the pages could save plenty money.
Quote:
* Page reduction (est.): 50KB
* Page views/day: 40,000,000
* Projected bandwidth savings:
o 2 terabytes/day
o 61 terabytes/month
o 730 terabytes/year
Now of course The TV Room doesn't get quite as many visitors as that but it does make a difference.
Whether *YOU* have broadband or not the site is still sending the same amount of stuff so that isn't relevent.
--
Mark - standards came about because of the Netscape/IE browser war. Back in the old days you used to have to make two versions of every site to allow it to work in each browser. The standards were invented to stop all this nonsense.
--
and finally as your you Digiturd
"Not everyone has stylesheets, and there's nothing wrong about <body bgcolor=white> type coding - it's HTML3."
Do you know how much bigger your stuff has to be if you define everything like that? Plus HTML3 although still a valid language is from (goes to check). HTML 3.2 - 14-Jan-1997.