3

I have noticed that whenever I go to namecheap.com, the page loads abnormally. Instead of the gradual loading like most websites, namecheap stays completely blank for a few seconds, and then suddenly everything appears. I got curious, and I looked at the page source and found this script:

(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
                                h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
                                (a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
                                })(window,document.documentElement,'async-hide','dataLayer',4000,
                                {'GTM-544JFM':true});

Which goes through all the elements in the page, and removes the async-hide CSS class from them. There is also a CSS rule: .async-hide { opacity: 0 !important} that hides elements with this class.

To me, this seems very bad from a UX stance, but I am wondering if there is any good reason to do this?

closed as primarily opinion-based by Wanda, Shreyas Tripathy, Mayo, Ken Mohnkern, locationunknown Jun 19 at 5:22

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I think this is one of those things that can only be explained by the original creator of the code, as it is not obvious at first glance. – Wanda Jun 17 at 11:07
  • I See one Point where this might be usefull for the user. I often see pages load normally, then there is a point where i can see where to click, but when i position the cursor in the button IT moves downwards because of an advertisement loading and pushing it out of the way. Loading like in your example prevents this. – Jan Windemuth Jun 18 at 13:05
5

Since giving system feedback to the user that shows something is happening is essential, otherwise they will think something is broken, I don’t immediately see a reason for this.

Here is a depiction if the user experience during loading: enter image description here

There might be a dev reason or simply a call made by some manager or developer, but we will never know.

  • My money is on the PHB, this must be a silly "mandate from business" that no developer has the power to fight. – KlaymenDK Jun 17 at 19:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.