A
A
Ainur Shakirov2016-05-13 16:13:19
PHP
Ainur Shakirov, 2016-05-13 16:13:19

Why is authorization (and work with it) on Js on Ali and a number of Chinese stores?

If you go to Ali and not unknown JD, then the "login" button is loaded, and only then JS replaces it with "my account".
What is it connected with? Why is this done? Security? Crutch?
After all, this is wildly inconvenient for the user, especially if the Internet is slow.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
Fat Lorrie, 2016-05-13
@Free_ze

Because now it is fashionable to make "thick" interfaces on javascript and REST api backend, which is accessed by the UI (via ajax) with a minimum of page reloads.
The scripts weigh a lot, generate additional requests, which is why at first just a static page (with a button) is loaded, then the scripts arrive (they connect at the very bottom, in front </body>), again make an ajax request to the server: "Is this user authorized? ", to which the server replies "yes", and the script draws a link to "my account".
So it's more of a bug, like a feature of rich-UI sites.

X
xmoonlight, 2016-05-13
@xmoonlight

This is the "curvature" of the conceptual algorithm for automatic authorization. (and not code or encoder)
First, you need to check, and then - show: logged in or not.
Instead of doing automatic authorization, visualizing the process as a cartoon.

A
Alexey Nikolaev, 2016-05-13
@Heian

I assume that this is done to reduce the load. Our narrow-eyed friends don’t have the same traffic as Russian, the population is much larger, and during peak hours, Chinese services lag so much that nothing can be done.
Therefore, they took out the maximum of functions in ajax in order to increase the speed of loading the page itself. While the user is typing what he wants to do next, ajax requests will be executed that will load additional data.

S
sim3x, 2016-05-13
@sim3x

Caching everything and everyone
We give everyone the same page from memory, and preferably from the browser cache, and then we modify it for the user
Faster or slower still needs to be measured

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question