4 ms·
innerHTML is still the fastest way to inject content into a page.
by statictype 16y ago
innerHTML is still the fastest way to inject content into a page.
- points 16y agoYou're correct (In IE), and also the worst. Security issues, encoding issues, scripting attack issues, inability to work with tables event handlers etc etc. Never use innerHTML for anything serious.
- statictype 16y agoAre there faster ways of getting HTML into a page on other browsers? As far as I know, innerHTML is always the fastest in any browser. I agree its not as safe though.