{"action":"created","issue":{"url":"https://api.github.com/repos/google/physical-web/issues/482","labels_url":"https://api.github.com/repos/google/physical-web/issues/482/labels{/name}","comments_url":"https://api.github.com/repos/google/physical-web/issues/482/comments","events_url":"https://api.github.com/repos/google/physical-web/issues/482/events","html_url":"https://github.com/google/physical-web/issues/482","id":98491472,"number":482,"title":"PROPOSAL: Get Title/Description/icon from site directly","user":{"login":"scottjenson","id":1055674,"avatar_url":"https://avatars.githubusercontent.com/u/1055674?v=3","gravatar_id":"","url":"https://api.github.com/users/scottjenson","html_url":"https://github.com/scottjenson","followers_url":"https://api.github.com/users/scottjenson/followers","following_url":"https://api.github.com/users/scottjenson/following{/other_user}","gists_url":"https://api.github.com/users/scottjenson/gists{/gist_id}","starred_url":"https://api.github.com/users/scottjenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottjenson/subscriptions","organizations_url":"https://api.github.com/users/scottjenson/orgs","repos_url":"https://api.github.com/users/scottjenson/repos","events_url":"https://api.github.com/users/scottjenson/events{/privacy}","received_events_url":"https://api.github.com/users/scottjenson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-01T00:05:39Z","updated_at":"2015-08-02T17:06:21Z","closed_at":null,"body":"BACKSTORY\r\nOne of the issues with have in supporting mDNS (a broadcast protocol over wifi) is that many of the URLs broadcast area [local IP address](https://en.wikipedia.org/wiki/Private_network) This means the Physical Web Service (PWS) can't contact the site to fetch/cache the meta data (Title/Description/Icon)\r\n\r\nKeep in mind that the Physical Web wants to be more than just BLE. One of the main reasons we added mDNS was to show that we can harvest URLs from a range of sources. We expect there to be other transports as well. \r\n\r\nAs the PWS can't get the Title/Description/Icon for the client, the client now needs to fetch it directly. One of the core principles of the Physical Web is that we try to build on top of the web as much as possible. So instead of having, for example, an mDNS specific path to pass the Title/Description/Icon through, we feel it is much better to come up with a web based approach which can work with any future transport that comes along.\r\n\r\nThe current way to find the Title/Description/Icon information is to have the PWS just download the entire page and parse through the HTML. This is useful for the simple reason is that no site needs to change anything, the Physical Web works with them as is.\r\n\r\nThe problem is that we want to keep the effort/processing/data requirements of any client to a minimum. Of course a client can do anything it wants and if someone wants to do the HTML traversal, please, go knock yourselves out. However, the proposal here is to provide something much lighter and easier to support. In fact, this should also work for any page, public or private, it doesn't have to be limited to local IP addresses. \r\n\r\nACTUAL PROPOSAL\r\nAny website that wants to expose the Physical Web meta data specifically would do it through RESTful call so http:/w.x.y.z/info (exact path is TBD) would return a JSON blob of text that would include these attributes. If this exists, it would supersede the HTML tag info. Like the path, the details of the JSON blob are TBD.\r\n\r\nThe purpose of this issue is to gather comments from the community. Assuming we get agreement on this REST/JSON approach, we'll move onto the details (exact path, JSON structure)"},"comment":{"url":"https://api.github.com/repos/google/physical-web/issues/comments/127045245","html_url":"https://github.com/google/physical-web/issues/482#issuecomment-127045245","issue_url":"https://api.github.com/repos/google/physical-web/issues/482","id":127045245,"user":{"login":"danbri","id":170265,"avatar_url":"https://avatars.githubusercontent.com/u/170265?v=3","gravatar_id":"","url":"https://api.github.com/users/danbri","html_url":"https://github.com/danbri","followers_url":"https://api.github.com/users/danbri/followers","following_url":"https://api.github.com/users/danbri/following{/other_user}","gists_url":"https://api.github.com/users/danbri/gists{/gist_id}","starred_url":"https://api.github.com/users/danbri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbri/subscriptions","organizations_url":"https://api.github.com/users/danbri/orgs","repos_url":"https://api.github.com/users/danbri/repos","events_url":"https://api.github.com/users/danbri/events{/privacy}","received_events_url":"https://api.github.com/users/danbri/received_events","type":"User","site_admin":false},"created_at":"2015-08-02T17:06:21Z","updated_at":"2015-08-02T17:06:21Z","body":"FWIW if there's anything missing from schema.org's vocabulary which would make things easier here, just file an issue (nearby in http://github.com/schemaorg/schemaorg). \r\n\r\nIf JSON inline in HTML is too much to handle, sticking JSON-LD in its own file with a link rel=meta or similar should work. \r\n\r\nAn aside re Google (although none of this is otherwise Google-specific): Google is currently focussed on JSON-LD within HTML but that is not set in stone, and even then will index the post-Javascript DOM so you could have a script load up the external metadata and inject it into the page to make it available for the various features listed at http://developers.google.com/structured-data/"}}