search

Home  >  Q&A  >  body text

javascript - How is the pre-loaded html of the international version of Taobao Mobile implemented?


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~

过去多啦不再A梦过去多啦不再A梦2785 days ago784

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-05-24 11:40:37

    The previous html is returned directly by server-side rendering, while the latter one needs to be generated after running js

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-24 11:40:37

    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.

    reply
    0
  • Cancelreply