javascript - How is the pre-loaded html of the international version of Taobao Mobile implemented?
过去多啦不再A梦2017-05-24 11:38:37
0
2
691
Pay attention to the inside of class="main-content". A section of p is pre-loaded. When the data is requested, the previous pseudo-blank is replaced with the real p. I think Know how to achieve it~
These data are loaded asynchronously and dynamically, so use this p to occupy the position on the first screen to give you a better experience. Wait until you slide to the corresponding part before requesting the data. You can see the network request to find out.
The previous html is returned directly by server-side rendering, while the latter one needs to be generated after running js
These data are loaded asynchronously and dynamically, so use this p to occupy the position on the first screen to give you a better experience. Wait until you slide to the corresponding part before requesting the data. You can see the network request to find out.