User Experience Asked on November 5, 2020
As a UX engineer, I try to stay current with best practices.
I noticed that Facebook recently changed their HTML to be scrambled for the datetime of a post.
I’m wondering why that would be a good practice.
The screenshot below shows all of the nested
What appears as "September 24 at 6:45 AM" is actually
StfepltembretSopr 2oo4sacrnsg aut 6a:g4rl5t orefdmeASMsr ·
I.e. extra characters have been inserted in between certain characters of "September 24 at 6:45 AM".
After copying to clipboard and then pasting somewhere, the garbled text is what I see.
It seems like a deliberate attempt to prevent people from copying the datetime of a post. (But copying and pasting from the body of the post is still allowed.)
Why would this be a good practice?
P.S. I’m using Windows Chrome and am logged in to Facebook. When I try via Incognito (logged out), the datetime does not use nested
span elements, so copying-and-pasting is not garbled.
Using the following clues, I'm fairly certain it's an unintended side effect of however they're implementing their internationalization. As you've noticed, this is not helpful, expected, or user-friendly in any way, so it almost certainly is an unpolished result of some implementation detail.
As you mention, it doesn't happen when you're logged out, which would make sense, as they probably use a different method for determining how to render dates once they look up your full profile details. Before you're logged in, the method is probably just based on the time zone set in your browser by your OS or checking the general location of your IP. After logging in, it probably uses a dictionary of sorts to present the date in the official format for your exact region set in your profile.
The example you provided is not actually the correct, localized date with extra characters mixed in, like you indicated in the question.
StugsSpeptlogemnhrbermero 29cs atre t1c:ort08r hghedanrsPM
S ept em ber 29 at 1 : 08 PM
"September 29 at 1:08 PM"
September 29 at 1:08 PM = September 29 at 10:08 AM + 3 hours
The fact that the jumbled mess *mostly* contains the same date, but only offset by a whole number of hours implies that the date representation is being calculated and rendered by the browser, based on the time zone it thinks you're in.
I did not check prior to today, but it works as expected for me this morning. I'm not sure if they've made a change to it's behavior since you opened this question, but I'd be curious to see if you still experience the same issue.
Correct answer by maxathousand on November 5, 2020
1 Asked on January 6, 2022 by homam
2 Asked on January 5, 2022
1 Asked on January 3, 2022
1 Asked on December 31, 2021 by user3718908
1 Asked on December 31, 2021 by m-jung
3 Asked on December 29, 2021
2 Asked on December 27, 2021 by zcb
4 Asked on December 24, 2021 by prasad-shiva
5 Asked on December 24, 2021 by juan-jardim
3 Asked on December 23, 2021 by briana
1 Asked on December 22, 2021
1 Asked on December 22, 2021 by dhwanilshah
1 Asked on December 17, 2021
2 Asked on December 15, 2021 by roxana
3 Asked on December 12, 2021 by michael-schmidt
2 Asked on December 12, 2021 by gaurav5430
Get help from others!