I have a website that is slow. The server responds for approximately 2 - 300 ms with each request, but it takes 1.5 - 2 seconds to view the page.
While experimenting with disabling javascript and CSS, I decided that this was browser processing, which took up most of the time.
Using Firebug, I see that the DOMContentLoaded event seems to fire about 0.5-1 second after receiving data from the server, and the "load" event fires in the second half of a second.
Using the Firebug profiler, I see that javascript takes about 250 ms to complete.
So my questions are:
- What does the browser do in the remaining time when it takes 250 ms to execute Javascript, but it takes a second before the page is ready?
- What happens between DOMContentLoaded and load events
- What would be the best approach for me - optimizing the client side of such a page?
source
share