I have noticed that facebook has random element IDs for every element - including elements that have no unique element id.
<div id="__w2_YvdN1r2_loading">blah</div>
Any ideas why they do this on every element & how they do this?
I have noticed that facebook has random element IDs for every element - including elements that have no unique element id.
<div id="__w2_YvdN1r2_loading">blah</div>
Any ideas why they do this on every element & how they do this?
One reason I can think of for "why" would be to prevent, or at least reduce the incidence of, screen scraping - if the IDs are indeed random. As to how, there are inumerable ways to generate pseudo-random values and any one of them could be coerced to produce a string that resembles __w2_YvdN1r2
.
Given how Javascript heavy Facebook is, I'd be quite surprised if the IDs are as random as you think, unless the values are also output into a javascript array/object/store of some description for the pages javascript to use.
So that it's harder to scrape meaningfully, probably just a string of random chars.
I am assuming this is to reference the base64 encoded UUIDs that they may be associated with -- perhaps representing a user or token.