Lucas Gonze deconstructs Google’s HTML. View Source to see his annotations. When you’re pushing gigabytes an hour, you do some optimizations.
Notes on the header Javascript:
- No language=”Javascript” attribute, presumably dropping back to the default to save bytes downloaded. [ The
languageattribute is no longer part of HTML ]- Very little action, for cross browser compatibility.
- I didn’t find the place where these javascript functions are invoked. Invocation might be implicit in a way I don’t know, or it might be a bug that it’s here.
- On the line
"location.href=document.getElementById(a).href"there’s no terminating semicolon. Definitely a bug. [ No! Dori (who's written extensively on JavaScript) says all you need is a hard return.]- I manually indented and pretty printed the ga function so I could read it.
[ formatting of HTML comments added ]