Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Google.com's source code so messy? [closed]

I'm just wondering why Google.com, one of the most minimalist websites, has a so messy HTML source code.

Two main questions:

  • Is it a sort of obfuscation in order to keep parts of the code "secret"?
  • Has anyone ever tried to explain it?
like image 673
TheUnexpected Avatar asked Sep 01 '26 17:09

TheUnexpected


1 Answers

Two things I can offer to help understand what's going on with google.com

  1. While the displayed content on the page is simple, there is a lot going on in behind the scenes to understand your browsing history, cookies, etc. to serve up dynamic content such as preset search results and ads, of course. In addition, while every piece of google.com looks simple but has much more going on behind it. The search bar gets populated with a drop down of search results as you type. Apps in nav bars get loaded as you drop in. The language of the site can change instantly. All of this is quite complex.
  2. All of this code has been minimized and files have been concatenated together to reduce page load time, making it look really messy. You're right in that google isn't interested in making the code you can see on their main page understandable. Their goal is to serve you the best possible experience. Hopefully that clears some of it up!
like image 162
Adam H. Avatar answered Sep 03 '26 08:09

Adam H.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!