V
V
vixh2012-03-04 16:42:43
JavaScript
vixh, 2012-03-04 16:42:43

Render at load time or on event

What would be more correct in terms of performance: When
loading the page, render the javascript template in the DOM and leave it hidden, or render and show after the event?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly, 2012-03-04
@taliban

If a part of the page is shown 100%, then it’s better to immediately render and hide it (the user still waits, an extra couple of milliseconds for him to one place) and if part of the page may not be shown, then it’s better to render it later at the request of the user (lazy type initialization)

K
Kirill Mamaev, 2012-03-04
@r00tGER

If the event is an explicit user action, then it is worth reducing the wait here. The delay in reaction to his action is much more noticeable to the user than the "usual" places of waiting, for example, loading the page as a whole.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question