Agent1891 Agent1891 - 5 months ago 16
HTML Question

How to make page loading feel faster?

I want to decrease the time taken by my pages to load and be displayed, assuming I start with an empty browser cache, and the pages may or may not have inline css and javascript in the html file. does changing the order in which files are sent to the browser decrease the display time, and thus make pages seem to be loading faster?

For example if a page has some .css, .js, .png files and so on, would loading the css first, display things faster?

And is there a standard/specific order to load file types?

Answer

Here are few steps that could optimize the performance of your web pages.

  • put css at top.

  • put javascript at bottom.

  • cache everything.

  • set far future expire header.

  • return 304 when appropriate.

  • use unique url for css and js for propagating the change.

  • apart from that use ajax wherever required.