javascript - The interface causes the buffered page to flash
天蓬老师
天蓬老师 2017-05-19 10:44:05
0
1
402

Some interfaces will write buffer pages, but if the data is fast, the page will flash because the buffer page comes out and disappears. The current solution is to modify the buffer page style, do not use a background color, and it will not flash. The second is to wait one second after the interface returns the data before canceling the display of the buffered page. Is there a better way?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all (1)
我想大声告诉你

From my experience of writing code for so many years, only when testing locally or on a server in a LAN, can the data be obtained instantly. Otherwise, there will be some transition time.
There are only two solutions that have been used:

  1. Like you said, set the minimum transition time, no matter how many blocks of data the interface returns.

  2. Try to make the transition effect not to have too much contrast with the page style after the content is loaded, so that even if the speed is very fast, you will not feel that the page will change.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!