{"id":70,"date":"2007-03-25T03:40:49","date_gmt":"2007-03-25T01:40:49","guid":{"rendered":"http:\/\/kpumuk.info\/javascript\/javascript-optimization-part-1-adding-dom-elements-to-document\/"},"modified":"2015-09-08T02:13:28","modified_gmt":"2015-09-08T00:13:28","slug":"javascript-optimization-part-1-adding-dom-elements-to-document","status":"publish","type":"post","link":"https:\/\/kpumuk.info\/javascript\/javascript-optimization-part-1-adding-dom-elements-to-document\/","title":{"rendered":"JavaScript optimization Part 1: Adding DOM elements to document"},"content":{"rendered":"<p>Most web-developers writing tons of JavaScript, especially in our Web 2.0 century. It&#8217;s powerful technology, but most browsers has very slow implementation of engine, and everyone at some instant decide to review code and make it faster. In this post I&#8217;ll share my experience and explain several tricks how to make your JavaScript as fast as possible.<\/p>\n<p>This is first article in 7 parts tutorial, stay tuned.<\/p>\n<p><!--more--><\/p>\n<p><strong>Scenario<\/strong>: you&#8217;re developing rich Internet application and you need to load dynamic elements using AJAX and then add them to current document. For some reason you don&#8217;t want (or can&#8217;t) use fully generated HTML, and decided to fetch items in JavaScript array.<\/p>\n<p>I know two classic ways to do so: create elements using <tt>document.createElement()<\/tt> method and concatenate HTML string and assign it to <tt>parentElement.innerHTML<\/tt> property. Of course, you can combine both ways. Let&#8217;s examine this ways in details.<\/p>\n<p>Classic way (and in ideal world the best way) is to use DOM for element manipulations:<\/p>\n<div class=\"codecolorer-container javascript twitlight\" style=\"overflow:auto;white-space:nowrap;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"javascript codecolorer\"><span class=\"kw1\">for<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw1\">var<\/span> i <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span> i <span class=\"sy0\">&lt;=<\/span> <span class=\"nu0\">1000<\/span><span class=\"sy0\">;<\/span> i<span class=\"sy0\">++<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">var<\/span> li <span class=\"sy0\">=<\/span> document.<span class=\"me1\">createElement<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'li'<\/span><span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; &nbsp; li.<span class=\"me1\">appendChild<\/span><span class=\"br0\">&#40;<\/span>document.<span class=\"me1\">createTextNode<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'Element '<\/span> <span class=\"sy0\">+<\/span> i<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; el.<span class=\"me1\">appendChild<\/span><span class=\"br0\">&#40;<\/span>li<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Not so bad performance. Internet Explorer 6 is slowest &#8211; <em>1403 ms<\/em> (but it is a slower browser in the world, right?), and other browser displayed results quickly (<em>63 &#8211; 328 ms<\/em>). Ok, but what about creating DOM element from HTML code?<\/p>\n<div class=\"codecolorer-container javascript twitlight\" style=\"overflow:auto;white-space:nowrap;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"javascript codecolorer\"><span class=\"kw1\">for<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw1\">var<\/span> i <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span> i <span class=\"sy0\">&lt;=<\/span> <span class=\"nu0\">1000<\/span><span class=\"sy0\">;<\/span> i<span class=\"sy0\">++<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">var<\/span> li <span class=\"sy0\">=<\/span> document.<span class=\"me1\">createElement<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'&lt;li&gt;Element '<\/span> <span class=\"sy0\">+<\/span> i <span class=\"sy0\">+<\/span> <span class=\"st0\">'&lt;\/li&gt;'<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; el.<span class=\"me1\">appendChild<\/span><span class=\"br0\">&#40;<\/span>li<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>It works better in Internet Explorer 6 (<em>1134 ms<\/em>), but does not work in other browsers at all. Weird! Of course, you can add <tt>try\/catch<\/tt> block and create elements using first approach in <tt>catch<\/tt> block for the other browsers. But I have better solution.<\/p>\n<p>Every DOM node has attribute <tt>innerHTML<\/tt> which holds all child nodes as HTML string.<\/p>\n<div class=\"codecolorer-container javascript twitlight\" style=\"overflow:auto;white-space:nowrap;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"javascript codecolorer\">el.<span class=\"me1\">innerHTML<\/span> <span class=\"sy0\">=<\/span> <span class=\"st0\">''<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">for<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw1\">var<\/span> i <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span> i <span class=\"sy0\">&lt;=<\/span> <span class=\"nu0\">1000<\/span><span class=\"sy0\">;<\/span> i<span class=\"sy0\">++<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; el.<span class=\"me1\">innerHTML<\/span> <span class=\"sy0\">+=<\/span> <span class=\"st0\">'&lt;li&gt;Element '<\/span> <span class=\"sy0\">+<\/span> i <span class=\"sy0\">+<\/span> <span class=\"st0\">'&lt;\/li&gt;'<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Wow, I&#8217;m highly impressed how slow could be adding elements procedure (<em>11391 &#8211; 307938 ms<\/em>)! Cool result, right? It&#8217;s because browser tried to render list while we updating and it&#8217;s take so long time. Little optimization:<\/p>\n<div class=\"codecolorer-container javascript twitlight\" style=\"overflow:auto;white-space:nowrap;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"javascript codecolorer\"><span class=\"kw1\">var<\/span> html <span class=\"sy0\">=<\/span> <span class=\"st0\">''<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">for<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw1\">var<\/span> i <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span> i <span class=\"sy0\">&lt;=<\/span> <span class=\"nu0\">1000<\/span><span class=\"sy0\">;<\/span> i<span class=\"sy0\">++<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; html <span class=\"sy0\">+=<\/span> <span class=\"st0\">'&lt;li&gt;Element '<\/span> <span class=\"sy0\">+<\/span> i <span class=\"sy0\">+<\/span> <span class=\"st0\">'&lt;\/li&gt;'<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\nel.<span class=\"me1\">innerHTML<\/span> <span class=\"sy0\">=<\/span> html<span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>All browsers shows great perfomance (<em>31 &#8211; 109 ms<\/em>), but Internet Explorer is still slow &#8211; <em>10994 ms<\/em>. I found solution which works very fast in all browsers: to create array of HTML chunks, and the join them using empty string:<\/p>\n<div class=\"codecolorer-container javascript twitlight\" style=\"overflow:auto;white-space:nowrap;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"javascript codecolorer\"><span class=\"kw1\">var<\/span> html <span class=\"sy0\">=<\/span> <span class=\"br0\">&#91;<\/span><span class=\"br0\">&#93;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">for<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw1\">var<\/span> i <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span> i <span class=\"sy0\">&lt;=<\/span> <span class=\"nu0\">1000<\/span><span class=\"sy0\">;<\/span> i<span class=\"sy0\">++<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'&lt;li&gt;Element '<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span>i<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'&lt;\/li&gt;'<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\nel.<span class=\"me1\">innerHTML<\/span> <span class=\"sy0\">=<\/span> html.<span class=\"me1\">join<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">''<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>It&#8217;s fastest approach for Internet Explorer 6 &#8211; <em>400 ms<\/em>, and very fast in other browsers. Why I&#8217;m not saying fastest in case of Firefox? I added another test to make in cleaner:<\/p>\n<div class=\"codecolorer-container javascript twitlight\" style=\"overflow:auto;white-space:nowrap;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/><\/div><\/td><td><div class=\"javascript codecolorer\"><span class=\"kw1\">var<\/span> html <span class=\"sy0\">=<\/span> <span class=\"st0\">''<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">for<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw1\">var<\/span> i <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span> i <span class=\"sy0\">&lt;=<\/span> <span class=\"nu0\">1000<\/span><span class=\"sy0\">;<\/span> i<span class=\"sy0\">++<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; html <span class=\"sy0\">+=<\/span> <span class=\"st0\">'&lt;li style=&quot;padding-left: '<\/span> <span class=\"sy0\">+<\/span> <span class=\"br0\">&#40;<\/span>i <span class=\"sy0\">%<\/span> <span class=\"nu0\">50<\/span><span class=\"br0\">&#41;<\/span> <span class=\"sy0\">+<\/span> <br \/>\n&nbsp; &nbsp; <span class=\"st0\">'&quot; id=&quot;item-'<\/span> <span class=\"sy0\">+<\/span> i <span class=\"sy0\">+<\/span> <span class=\"st0\">'&quot;&gt;Element '<\/span> <span class=\"sy0\">+<\/span> i <span class=\"sy0\">+<\/span> <span class=\"st0\">' Column '<\/span> <span class=\"sy0\">+<\/span> <br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#40;<\/span>i <span class=\"sy0\">%<\/span> <span class=\"nu0\">50<\/span><span class=\"br0\">&#41;<\/span> <span class=\"sy0\">+<\/span> <span class=\"st0\">'&lt;\/li&gt;'<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\nel.<span class=\"me1\">innerHTML<\/span> <span class=\"sy0\">=<\/span> html<span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>And second example:<\/p>\n<div class=\"codecolorer-container javascript twitlight\" style=\"overflow:auto;white-space:nowrap;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/><\/div><\/td><td><div class=\"javascript codecolorer\"><span class=\"kw1\">var<\/span> html <span class=\"sy0\">=<\/span> <span class=\"br0\">&#91;<\/span><span class=\"br0\">&#93;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">for<\/span> <span class=\"br0\">&#40;<\/span><span class=\"kw1\">var<\/span> i <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span> i <span class=\"sy0\">&lt;=<\/span> <span class=\"nu0\">1000<\/span><span class=\"sy0\">;<\/span> i<span class=\"sy0\">++<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'&lt;li style=&quot;padding-left: '<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span>i <span class=\"sy0\">%<\/span> <span class=\"nu0\">50<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'&quot; id=&quot;item-'<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span>i<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'&quot;&gt;Element '<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span>i<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">' Column '<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span>i <span class=\"sy0\">%<\/span> <span class=\"nu0\">50<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; html.<span class=\"me1\">push<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">'&lt;\/li&gt;'<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\nel.<span class=\"me1\">innerHTML<\/span> <span class=\"sy0\">=<\/span> html.<span class=\"me1\">join<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">''<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Here are the results in table and diagram formats.<\/p>\n<table class=\"bordered\" cellspacing=\"0\" cellpadding=\"2\">\n<tr>\n<th>No<\/th>\n<th>Method<\/th>\n<th>IE&nbsp;6<\/th>\n<th>IE&nbsp;7<\/th>\n<th>FF&nbsp;1.5<\/th>\n<th>FF&nbsp;2.0<\/th>\n<th>Opera&nbsp;9<\/th>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td><tt>createElement()<tt><\/td>\n<td align=\"right\">1403<\/td>\n<td align=\"right\">219<\/td>\n<td align=\"right\">166<\/td>\n<td align=\"right\">328<\/td>\n<td align=\"right\">63<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td><tt>createElement() full<tt><\/td>\n<td align=\"right\">1134<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<td align=\"center\">-<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td><tt>innerHTML<tt><\/td>\n<td align=\"right\">39757<\/td>\n<td align=\"right\">20781<\/td>\n<td align=\"right\">41058<\/td>\n<td align=\"right\">307938<\/td>\n<td align=\"right\">11391<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td><tt>innerHTML optimized<tt><\/td>\n<td align=\"right\">10994<\/td>\n<td align=\"right\">46<\/td>\n<td align=\"right\">50<\/td>\n<td align=\"right\">109<\/td>\n<td align=\"right\">31<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td><tt>innerHTML\/join<tt><\/td>\n<td align=\"right\">400<\/td>\n<td align=\"right\">31<\/td>\n<td align=\"right\">47<\/td>\n<td align=\"right\">125<\/td>\n<td align=\"right\">31<\/td>\n<\/tr>\n<tr>\n<td colspan=\"7\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td><tt>innerHTML\/optimized+<tt><\/td>\n<td align=\"right\">28934<\/td>\n<td align=\"right\">109<\/td>\n<td align=\"right\">84<\/td>\n<td align=\"right\">172<\/td>\n<td align=\"right\">62<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td><tt>innerHTML\/join+<tt><\/td>\n<td align=\"right\">950<\/td>\n<td align=\"right\">78<\/td>\n<td align=\"right\">110<\/td>\n<td align=\"right\">189<\/td>\n<td align=\"right\">62<\/td>\n<\/tr>\n<\/table>\n<p><a href=\"http:\/\/kpumuk.info\/wp-content\/uploads\/2007\/03\/adding_elements.png\" rel=\"lightbox\" title=\"Benchmark: Adding DOM elements to document\"><img decoding=\"async\" src=\"http:\/\/kpumuk.info\/wp-content\/uploads\/2007\/03\/adding_elements.thumbnail.png\" alt=\"Benchmark: Adding DOM elements to document\" \/><\/a><\/p>\n<p>You can view benchmark test and get your own results <a href=\"http:\/\/kpumuk.info\/projects\/examples\/javascript-optimization-part-1-adding-dom-elements-to-document\/\">here<\/a>.<\/p>\n<h2>Conclusions<\/h2>\n<ul>\n<li>Always use DOM node functions to keep your code standards-compliant. This approach has satisfactory performance and works in all browsers.<\/li>\n<li>If you need extremely high performance, use <tt>join<\/tt>+<tt>innerHTML<\/tt> method, which has best time in benchmark.<\/li>\n<li>Never use appending HTML strings to the <tt>innerHTML<\/tt> (yeah, if you need append one small element).<\/li>\n<li>Opera is fastest browser in the world, but Internet Explorer 7 is fast too, Firefox 2.0 surprised me with his low performance.<\/li>\n<li>Never believe fanatics like me and benchmark different approaches by yourself (but don't worry, Microsoft does not paid me for their browser advertisement).<\/li>\n<\/ul>\n<h2>Links to other parts<\/h2>\n<ul>\n<li><strong>Part 1: Adding DOM elements to document<\/strong><\/li>\n<li><a href=\"http:\/\/kpumuk.info\/javascript\/javascript-optimization-part-2-applying-styles-to-elements\/\">Part 2: Applying styles to elements<\/a><\/li>\n<li><a href=\"http:\/\/kpumuk.info\/javascript\/javascript-optimization-part-3-attaching-events\/\">Part 3: Attaching events<\/a><\/li>\n<li>Part 4: Multiple anonymous functions (will be published soon)<\/li>\n<li>Part 5: Attaching events on demand (will be published soon)<\/li>\n<li>Part 6: Element hide and show (will be published soon)<\/li>\n<li>Part 7: Elements collection enumeration (will be published soon)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Most web-developers writing tons of JavaScript, especially in our Web 2.0 century. It&#8217;s powerful technology, but most browsers has very slow implementation of engine, and everyone at some instant decide to review code and make it faster. In this post I&#8217;ll share my experience and explain several tricks how to make your JavaScript as fast [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[218],"tags":[59,58,57,11,43,33],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-benchmark","tag-browsers","tag-dom","tag-javascript","tag-optimization","tag-performance"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":4,"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":1350,"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/posts\/70\/revisions\/1350"}],"wp:attachment":[{"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kpumuk.info\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}