Why are the HTML classes of some large complex sites written as seemingly meaningless lines of letters?

For example, I just looked at a Google page and saw a class written as Yj Fg Ws IY fW Zf . Does this mean that someone can understand how Google is doing what it is doing? If you are a Google developer, how should you remember this, especially among all your other classes? Or how about anyone else who needs to make changes to this code in the future?

Does it make sense to code it this way?

+7
source share
5 answers

To make pages smaller and therefore faster to send to users, most major sites reduce files, especially javascript and css files. This operation is usually

  • merges files to reduce the number of requests
  • removes comments
  • removes useless spaces and CR
  • changes long variable names to shorter ones

One of the tools for this operation is provided by Google: The Closure Compiler . This is easy to do, and there is no reason to ignore it as soon as you start paying attention to the display speed or your bandwidth.

Some developers may use it to protect their source code, but this is not the most common reason.

+10
source

This is done for smaller page sizes. When you serve the number of pages Google does, dropping a few bytes can have a huge impact on the bandwidth you use.

+2
source

Save bytes and, as a result, save bandwidth? I think there are even programs for minimizing the source code, so the developer does not need to remember or even know the short names.

0
source

This is done for two reasons. Usually to reduce the size of the website. All site codes are abbreviated, and the names are replaced by my shorter version, for example. tellMeTheStuffFromThatServer(serviceABC, parameterABC); is replaced by a(b,c); . Very rarely, you also see this practice if someone wants their code to not be read by visitors, although this is clearly not very effective.

0
source

So that their design does not depend on the names of classes. he may return to harm them. class names are not just some damn thing, these are ideas. they are the foundation.

http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=111005600551

How much more can you find out. u can immediately understand that Ebay has the same handler class for all of its products and the handler is a Win Handler that has 2 properties passed to it. Of course, this is not an exact stereotype, at least for most urlencoded websites, which is a hash to avoid security risks, as well as design leaks ..

it will be like http://www.ebay.com/itm/ws/_ylt=AouAU5ULtZy2c38mrOUIQJGuitIF ;

Put meaningless things in urls

-2
source

All Articles