Why is Google.com's source code so messy?
Ad
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?
Ad
Answer
Ad
Two things I can offer to help understand what's going on with google.com
- 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.
- 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!
Ad
source: stackoverflow.com
Related Questions
Ad
- → How to update data attribute on Ajax complete
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → Octobercms Component Unique id (Twig & Javascript)
- → Passing a JS var from AJAX response to Twig
- → Laravel {!! Form::open() !!} doesn't work within AngularJS
- → DropzoneJS & Laravel - Output form validation errors
- → Import statement and Babel
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
Ad