{"id":19647,"date":"2017-11-27T14:46:04","date_gmt":"2017-11-27T19:46:04","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=19647"},"modified":"2017-11-27T14:46:04","modified_gmt":"2017-11-27T19:46:04","slug":"the-cost-of-javascript","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/11\/27\/the-cost-of-javascript\/","title":{"rendered":"The Cost of JavaScript"},"content":{"rendered":"<p><a href=\"https:\/\/medium.com\/dev-channel\/the-cost-of-javascript-84009f51e99e\">Addy Osmani<\/a> (via <a href=\"https:\/\/news.ycombinator.com\/item?id=15706103\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/medium.com\/dev-channel\/the-cost-of-javascript-84009f51e99e\"><p>On the high-end iPhone 8 it takes just ~4s to parse\/compile CNN&rsquo;s JS compared to ~13s for an average phone (Moto G4). This can significantly impact how quickly a user can fully interact with this site.<\/p><\/blockquote>\n<p>&ldquo;Just?&rdquo;<\/p>\n<blockquote cite=\"https:\/\/medium.com\/dev-channel\/the-cost-of-javascript-84009f51e99e\"><p>Using HTTP Archive (top ~500K sites) to analyze the state of <a href=\"http:\/\/beta.httparchive.org\/reports\/state-of-javascript#bytesJs\">JavaScript on mobile<\/a>, we can see that 50% of sites take over 14 seconds to get interactive. These sites spend up to 4 seconds just parsing &amp; compiling JS.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Addy Osmani (via Hacker News): On the high-end iPhone 8 it takes just ~4s to parse\/compile CNN&rsquo;s JS compared to ~13s for an average phone (Moto G4). This can significantly impact how quickly a user can fully interact with this site. &ldquo;Just?&rdquo; Using HTTP Archive (top ~500K sites) to analyze the state of JavaScript on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[],"tags":[31,346,138,71,96],"class_list":["post-19647","post","type-post","status-publish","format-standard","hentry","tag-ios","tag-javascript","tag-optimization","tag-programming","tag-web"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=19647"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19647\/revisions"}],"predecessor-version":[{"id":19648,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/19647\/revisions\/19648"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=19647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=19647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=19647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}