javascript - How to calculate the time above the fold of a page?
PHP中文网
PHP中文网 2017-05-18 10:55:23
0
2
525

Like the title
How to calculate the first screen time of the page?
The first screen may contain pictures and other resources, which may be rendered asynchronously.

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
phpcn_u1582

Use the timeline and profile functions of chrome devtools.

左手右手慢动作

Do you want to take a look or is it a business requirement? If you just want to take a look, you can use the devtool timeline.
If needed for development, you can get the time in the first line of the server script, and then after the client js completes loading of the page, you can calculate the total time from getting the entire request to response and rendering based on the elapsed time.

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