Tuesday, December 17, 2013

page loading tricks

  1. Put script tags at the end of an HTML page if possible (just before </body> to allow the HTML content to load. Putting a script tag in the <head> tag in an old school way requires the .js script referenced to load completely before any HTML may be shown in the browser.
  2. Try not to have one <div> tag wrapping all page contents. If you do this, the whole of the contents have to load at once. Try to have a series of tags inside the <body> tag instead of falling immediately into a second God wrapper.

No comments:

Post a Comment