{"id":36,"date":"2011-10-13T16:00:59","date_gmt":"2011-10-13T16:00:59","guid":{"rendered":"http:\/\/www.w3.org\/community\/native-web-apps\/?p=36"},"modified":"2011-10-14T08:14:18","modified_gmt":"2011-10-14T08:14:18","slug":"misconception-widgets-lack-an-origin","status":"publish","type":"post","link":"https:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/13\/misconception-widgets-lack-an-origin\/","title":{"rendered":"Misconception: Widgets lack an origin"},"content":{"rendered":"<p>As well as being able to use a classic \u201chttp:\/\/domain.com\u201d style origin, widgets can also use a custom scheme called the Widget URI scheme that typically looks like this:<\/p>\n<p><code>widget:\/\/c1[\u2026UUID\u2026]a66\/index.html<\/code><\/p>\n<p>The <a href=\"http:\/\/dev.w3.org\/2006\/waf\/widgets-uri\/\" target=\"_blank\" rel=\"nofollow\">widget URI scheme<\/a> works like a \u201cfake\u201d HTTP server: sending back local files from inside a widget package (e.g., an image) by simulating a HTTP responses.<\/p>\n<p>The misconception about origin arises because people don\u2019t really understand what an origin is: they think it means http:\/\/some.url.com (i.e., a website). Thankfully, the <a href=\"http:\/\/www.whatwg.org\/specs\/web-apps\/current-work\/multipage\/origin-0.html\" target=\"_blank\" rel=\"nofollow\">HTML Standard<\/a> makes it clear by defining an origin as:<\/p>\n<blockquote><p><q>opaque identifiers or tuples consisting of a scheme component, a host component, a port component, and optionally extra data.<\/q><\/p><\/blockquote>\n<p>In other words, widget:\/\/ makes for a perfectly valid origin.<\/p>\n<p>Other posts in this series:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/10\/misconception-widgets-reinvent-the-wheel\/\">Misconception: Widgets reinvent the wheel<\/a><\/li>\n<li><a href=\"http:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/11\/misconception-json-is-easier-than-xml\/\">Misconception: JSON is easier than XML<\/a><\/li>\n<li><a href=\"http:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/12\/32\/\">Misconception: XML Digital Signatures is too hard to implement<\/a><\/li>\n<li><a href=\"http:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/13\/misconception-widgets-lack-a-security-model\/\">Misconception: Widgets lack a security model<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>As well as being able to use a classic \u201chttp:\/\/domain.com\u201d style origin, widgets can also use a custom scheme called the Widget URI scheme that typically looks like this: widget:\/\/c1[\u2026UUID\u2026]a66\/index.html The widget URI scheme works like a \u201cfake\u201d HTTP server: &hellip; <a href=\"https:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/13\/misconception-widgets-lack-an-origin\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":233,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[6],"tags":[5],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-w3cwidgets","tag-w3c-widgets"],"_links":{"self":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/users\/233"}],"replies":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":7,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/36\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}