Settings

Theme

Google.com source code (not simple anymore)

15 points by rk1987 · 12 comments · 1 min read


view-source:https://www.google.com/

Maybe it's just me, but realized google.com source code (HTML) used to be very simple but it looks very different now.

Try navigating HTML elements using dev tools.

8 threads
carrja99

And here I thought this was a post about the google.com source code being leaked. :-)

I'd imagine that the rendered HTML is probably produced by a legacy system that stitches together a lot of different templates, some maybe even unintentionally.

bstackd

No surprise, they have to compress like mad and avoid superfluous http requests. That sort of optimisation will never look fancy

5h

I wonder why there are multiple style elements, in div#footcnt there are 2 right next to each other, they could have saved a whole "</style><style>" there, think of the bandwidth!

/s

mdturnerphys

Quantified: https://news.ycombinator.com/item?id=4647834

egonschiele

I wonder if the giant script was an external file, and now it's being splat on the page?

  • connerbryan

    I'd believe it. As someone else mentioned above, they've also started inlining image data, so I wouldn't be surprised if these changes all fell under the goal of minimizing HTTP requests.

gotothrowaway

The other day I noticed that they're inlining image data in the src attribute instead of pointing at an external URL. Really taking things to the next level all-around - I wonder when that will become the norm instead of css image sprites.

  • nonuby

    Hopefully never, and certainly not with http 2.0 around the corner (this adoption wont be so slow, things are already starting to fall neatly into place). It's a micro-optimization Google can afford to do, others will just rely on optimize images size and a CDN instead (possibly an extra hostname) and vast majority wont/don't even bother..

philippnagel

Click-bait ;)

karangoeluw

I don't get it, what's the point of this post? How is it adding any new knowledge to the readers?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection