Skip to content Skip to sidebar Skip to footer

Why Do Facebook And Google Pages Have Strange Ids And Classes?

Many a times I have inspected element on facebook and google pages but their page always have strange values as ids and classes in their html elements. Have a look at Attributes of

Solution 1:

it's likely that they generate new classes and ids with each time the build is run to avoid having caching issues... this would be something thats done via the build and not defined by the developers

Solution 2:

Other answers partially answer this. Its not to deal with caching. Its not to avoid hackers, just makes their work a little more fun. Its mainly to reduce page size and improve bandwidth use. Its called js minifying. Its automated before publishing the code. It can be a pain to debug but there are tools to unminify which help. Also using 'caja' or closure compiler also causes this and provides protection from the js itself.

Post a Comment for "Why Do Facebook And Google Pages Have Strange Ids And Classes?"