亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - Tmall homepage first screen data source
曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新 2017-07-05 10:48:27
0
7
1347

I am studying the code of Tmall homepage, and I feel that its first-screen data does not look like it is loaded by ajax, so I would like to ask, how is its first-screen data loaded?

for example:

window.g_config.serverTime = 1496370628991;   // "1496370628991"這個數(shù)字每次刷新都是變化的
<p id="J_defaultData" style="display:none;"> ………… </p> // 這個p(p中的json數(shù)據(jù)太長,所以省略了)里面的數(shù)據(jù)查看源代碼的時候就有,并不像是ajax請求的。

The picture below is the data in p

曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新

reply all(7)
巴扎黑

After studying for an afternoon, I probably understand that the Tmall homepage is made using node on the server side, so the data will be brought in when the HTML is rendered. What you said above is correct. The data you get when you check the source code must be coming directly from the server.

淡淡煙草味

Alibaba uses fetch technology to load, not ajax.

伊謝爾倫

I haven’t researched it, but I guess it comes directly from the server

僅有的幸福

Template engine
Variable replacement

小葫蘆

You can take a look at things related to server-side rendering. . In order to improve the rendering speed of the first screen. . Whether you use PHP or nodeJS, it can be rendered on the server side

女神的閨蜜愛上我

https://developer.mozilla.org... fetch的API

學霸

I object to the fetch mentioned above, whether it is fetch or ajax. You can see the request being sent in the network, but obviously not on the home page.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template