Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 420878 - Add simplified web app breadcrumb support to refractor
: Add simplified web app breadcrumb support to refractor
Status: NEW
Product: Mozilla Labs
Classification: Other
Component: Prism (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on:
  Show dependency treegraph
Reported: 2008-03-04 08:33 PST by Mark Finkle (:mfinkle) (use needinfo?)
Modified: 2012-08-21 23:22 PDT (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Description Mark Finkle (:mfinkle) (use needinfo?) 2008-03-04 08:33:04 PST
Currently, refractor can sniff a web page for <link rel="webapp" href="uri-to-webapp-bundle"/> and prompt the user to install the webapp as a Prism app.

We should add simplified support like that found here:

If you want a desktop shortcut icon, add shortcut="true" to the <html> tag:

<html shortcut="true">

Icon support:
<link rel="shortcut.icon" title="16x16" href="icon16x16.png"/>
<link rel="shortcut.icon" title="32x32" href="icon32x32.png"/>
<link rel="shortcut.icon" title="48x48" href="icon48x48.png"/>
<link rel="shortcut.icon" title="128x128" href="icon128x128.png"/>

<meta name="" content="Test Application"/>
<meta name="shortcut.url" content=""/>

Most of these have sensible defaults and can be left out:
'' defaults to the HTML TITLE element if not present.
'shortcut.url' defaults to the page's URL if not present.

Comment 1 Fredrik Larsson (:nossralf) 2008-03-04 10:08:05 PST
Sounds like a great idea to me.
Comment 2 Myk Melez [:myk] [@mykmelez] 2008-03-04 11:51:10 PST
The <link> tags for icon support seem decent.

I like the word "shortcut", which doesn't imply "desktop" and could be used equally well to populate an in-browser shortcut (i.e. bookmark) or an on-phone shortcut (f.e. home screen icon), although I wonder if it's really necessary to differentiate between a "shortcut" icon and an icon destined for some other use (especially for |rel="shortcut.icon" title="16x16"|, which seems identical to |rel="icon"|).

Also, use of the "title" attribute in this way is a bit of a hack, but it's not unreasonable.  An alternative would be to include the resolution in the relationship name ("32x32icon", "128x128icon", etc.), which might simplify retrieval and is a bit less hacky but might be harder for authors to remember.

Regarding the <meta> tags, shortcut.url doesn't make a lot of sense as a <meta> tag, since specifying URLs is what <link> tags are for.  And there are already link types that would work well here, including Start and Bookmark <>.

<link> tags also include a "title" attribute, so and shortcut.url could both be satisfied with a single <link> tag.  I think that's the better approach.
Comment 3 Fredrik Larsson (:nossralf) 2008-03-04 13:55:40 PST
Just to note, the naming scheme used by PubTools maps directly to what Gears uses for the createShortcut function:

I agree with Myk on using a <link> tag to set up any URL and name instead of using <meta> kludges.

As for using shortcut="true" as it's specified by PubTools, I have to admit I don't see much point in having Refractor care at all what the website specifies, and instead leaving the decision whether to create a shortcut or not up to the user. (Currently, install-shortcut.js won't accept no for an answer when it comes to creating one or not.)

For the icons, the title attribute definition by the W3C is: "This attribute offers advisory information about the element for which it is set." Which means title="32x32" would be quite alright, since it's advisory information about the icon's dimensions.

Note You need to log in before you can comment on or make changes to this bug.