{"id":181,"date":"2012-04-15T09:21:11","date_gmt":"2012-04-15T09:21:11","guid":{"rendered":"http:\/\/www.w3.org\/community\/respimg\/?p=181"},"modified":"2012-04-15T09:21:11","modified_gmt":"2012-04-15T09:21:11","slug":"mimicking-the-noscript-functionality-a-new-proposal","status":"publish","type":"post","link":"https:\/\/www.w3.org\/community\/respimg\/2012\/04\/15\/mimicking-the-noscript-functionality-a-new-proposal\/","title":{"rendered":"Mimicking the noscript functionality: A new proposal"},"content":{"rendered":"<p>I wanted to float another idea which I&#8217;ve been toying with to hear what other people think and see if its a viable tool.<\/p>\n<p>When we created our noscript solution we discovered that the image inside wasn&#8217;t being added to the DOM and therefore the\u00a0src attribute wasn&#8217;t making a request to the server. So we were pleased we&#8217;d found a work around but it&#8217;s a pretty dirty hack and I&#8217;m not that keen on it even though it does the job.<\/p>\n<p>What I&#8217;d really like is another way of adding content to the\u00a0HTML which isn&#8217;t loaded into the DOM until either my CSS or JS has decided what it wants to do with it. I&#8217;m also wondering if this is a way I can get more info into the HTML page, without having to add weight to the HTTP header and if this idea could be extended beyond just responsive images, into other parts of responsive asset management and build (i.e. fonts, media, video etc. )<\/p>\n<p>I was thinking of submitting a proposed spec for something like a defaults tag, or possibly \u00a0a line in the meta data to tell modern browsers to omit certain DOM requests, like img src until the client has decided which src request it wants to make. That way old browsers can still load the image src as normal, we don&#8217;t have to do dirty things like hiding stuff in the noscript and modern browsers can hijack the img tag to prevent the page making the img src request until its ready.<\/p>\n<p>Would love to hear other peoples opinions on this technique and if anyone has any suggestions on ways to improve on it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to float another idea which I&#8217;ve been toying with to hear what other people think and see if its a viable tool. When we created our noscript solution we discovered that the image inside wasn&#8217;t being added to &hellip; <a href=\"https:\/\/www.w3.org\/community\/respimg\/2012\/04\/15\/mimicking-the-noscript-functionality-a-new-proposal\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1360,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"yes","footnotes":""},"categories":[1],"tags":[],"class_list":["post-181","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/posts\/181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/users\/1360"}],"replies":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/comments?post=181"}],"version-history":[{"count":2,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/posts\/181\/revisions"}],"predecessor-version":[{"id":183,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/posts\/181\/revisions\/183"}],"wp:attachment":[{"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/media?parent=181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/categories?post=181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.w3.org\/community\/respimg\/wp-json\/wp\/v2\/tags?post=181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}