F
F
frostexzo2021-02-07 04:21:21
Vue.js
frostexzo, 2021-02-07 04:21:21

White screen for a moment on page load (vue js)?

Welcome all.
There is such a problem that at the beginning of the page loading, a white screen appears for a moment, playing with inline styles and preloads is not treated in any way, the dev tools show that at this moment the domcontentloaded event and some further scripts occur, and after them page rendering begins. I googled various vue js applications and this problem occurs somewhere in 50% of cases, so I would like to know how the second half dealt with it.

UPD: Clean build of vue-cli

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin B., 2021-02-07
@frostexzo

To answer this question, you need to understand how Vue works. Since this is a SPA application, page rendering starts when the main script of the page is loaded, and the data is also loaded.
And this is not a problem. If this is a problem for you, then you should look at SSR in Nuxt.js
Then your markup will be loaded from the server and displayed immediately without flickering

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question