DOM
-
use events delegation, instead of direct binding e.g. a table with 1000 rows, $("table").on("click", "tr", fn);
-
reduce reflow when changing DOM node 1. hide it first, then change, then display 2. clone it then change, then replace
-
when changing DOM style, do not change it one by one
-
fixed and absolute position will not reflow, use them to do layout
-
try to change DOM node at lowerst level possible
-
don't use table to do layout
Loading
-
browser cache 1. set expiry date, maximum age in the HTTP header 2. set name as fingerprint
-
proxy cache 1. Cache-control: public
-
gzip, minified
-
CDN