More pages JS file, web page loading speed of impact, how to solve

  "Slow page rendering", page layout is unreasonable how to solve?
  IIS7 website monitoring
  can get seriously take up the load time of JS or images, css and other html files used to help us improve the site opens speed.
  1. All pages css style files are merged into a code, compressed into <style> in the <style> and a page can only be present in the <head>
  all <script> 2. page regardless of external document, or nested inside, are placed in </ body> before. (<body> closing tag)
  If the location <script> tag can not move, they change the js, be sure to put the final page.
  For example <script> has document.write (); can put a previously hidden <div> at a predetermined position,
  and then the bottom of the page js, innerHTML to <div> in.
  3. The best of the little bits and pieces of js code are merged into a single file. But a single js file is also not too much, not more than 25k.
  These points do, you can speed page above the fold in about 1 second. (1 second has been very fast, few can reach 1 second).

Guess you like

Origin blog.51cto.com/14552957/2442576