Closed Bug 1180771 Opened 10 years ago Closed 10 years ago

When navigating to a page on the same domain, don't set the default icon

Categories

(Firefox OS Graveyard :: Gaia::System::Browser Chrome, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S3 (24Jul)

People

(Reporter: gmarty, Assigned: gmarty)

References

Details

Attachments

(1 file)

When the user navigate to a page located on the same domain than the previous one, there is no need to set the default icon. We can keep the current icon. But we still need to look for the best icon after the new page is loaded (it can have a different manifest or meta tags than the previous one).
Comment on attachment 8630041 [details] [review] [gaia] gmarty:Bug-1180771-When-navigating-to-a-page-on-the-same-domain-dont-set-the-default-icon > mozilla-b2g:master Ben, can you review this patch? It's a UX optimisation on the icon.
Attachment #8630041 - Flags: review?(bfrancis)
Blocks: 1168944
Comment on attachment 8630041 [details] [review] [gaia] gmarty:Bug-1180771-When-navigating-to-a-page-on-the-same-domain-dont-set-the-default-icon > mozilla-b2g:master Hi Guillaume, I know this is annoying at the moment and I know this is what we did for the prototype, but I'm not sure this is the right solution for the real implementation. The reasons are: 1. It's possible to have multiple sites per domain with different icons (.e.g. google.com/calendar and google.com/maps) where the icon should change when you navigate between them. 2. I'd like to have a loading spinner displayed in place of the icon while a page is loading instead (see bug 1179908). It's possible that we can optimise the implementation to try to prevent the icon being set again unnecessarily, but I think we need to actually check whether the icon URL has changed, not just the hostname of the document URL. One exception to this is that if a manifest with a scope property and icon is provided, it is safe to assume that any URL within that scope has the same icon.
Attachment #8630041 - Flags: review?(bfrancis)
The point 1. is already covered by this patch. The icon is checked again after load, even if the page is on the same domain than the previous one. I think it's in line with how the theme-color works. We don't reset to grey during page load and transition the colour from the previous to the new one.
I don't think this behaviour is incompatible with using a spinner in the icon. Even if we decide to go for the spinner, we can still reuse the icon from the previous page if on the same domain. Then change it again if it's different on the new page. I think we should also consider the value of scope, as you suggested. Do you want me to update this patch accordingly?
Flags: needinfo?(bfrancis)
Comment on attachment 8630041 [details] [review] [gaia] gmarty:Bug-1180771-When-navigating-to-a-page-on-the-same-domain-dont-set-the-default-icon > mozilla-b2g:master OK, this is an improvement on what is there right now. r+ with nits on Github. Thanks!
Flags: needinfo?(bfrancis)
Attachment #8630041 - Flags: review+
Assignee: nobody → gmarty
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S2 (10Jul)
Target Milestone: FxOS-S2 (10Jul) → FxOS-S3 (24Jul)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: