Closed Bug 1180291 Opened 9 years ago Closed 9 years ago

Pre-fetch newtab layout

Categories

(Firefox :: New Tab Page, defect)

40 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Iteration:
43.2 - Sep 7

People

(Reporter: emtwo, Assigned: marcosc)

References

Details

In order to avoid delays in fetching and populating the page layout when a user attempts to open "about:newtab", we will pre-fetch and store the remotely hosted layout. Pre-fetching will happen periodically (Once a day? once an hour?).
Note: if we are unable to pre-fetch the page layout, we fallback to the current, non-remote implementation of about:newtab
Depends on: 1186121
Talked to adw and MattN from FX team. The proposal of stashing a copy of newtab code into user profile found little support. The basic sentiment is "a remote page should be remote, or else keep the code in FX". Suggestions: 1) keep page fully remote, keep page in the browser cache, if something missing show about:home or empty pge with a message 2) otherwise, try to pin page in the cache. Service workers enable cache control - use them when they are ready. (if anyone knows when service workers are due, please share) 3) in the absence of service workers attempt to use AppCache to pin remote page in the cache. 4) if all else fail - fetch on your own and find someone with r privileges to review and approve I am going to investigate AppCache for now, if anyone has a suggestion please share
The main thing I would want to know is whether we can get approximately the same performance (page load time) as about:newtab has now using AppCache. How can we deal with a slow network using AppCache? Do we assume 'offline mode' in most cases unless there is an update available? Can we download and cache newtab in the background so it's available to show before a user opens about:newtab?
(In reply to Marina Samuel [:emtwo] from comment #3) > Can we download and cache newtab in the background so it's available to show before a user opens > about:newtab? You may get this for free with the new tab preloader.
(In reply to Marina Samuel [:emtwo] from comment #3) > The main thing I would want to know is whether we can get approximately the > same performance (page load time) as about:newtab has now using AppCache. > > How can we deal with a slow network using AppCache? Do we assume 'offline > mode' in most cases unless there is an update available? Can we download and > cache newtab in the background so it's available to show before a user opens > about:newtab? What if the browser is just off-line and does not have nothing cached - how do handle this situation?
> What if the browser is just off-line and does not have nothing cached - how > do handle this situation? I imagine this scenario would only happen to a user who *just* downloaded Firefox (or created a new profile) and then lost their internet connection (or has slow internet). In this case, maybe we can do what you mentioned in 1) Max, show about:home or an empty page with a message. I think this is ok since the user will likely not have much (or any) history in the first place so their new tab experience really would have just been directory tiles.
Assignee: nobody → mzhilyaev
After a recent conversation with :marcosc, :emtwo and myself, we have decided to use Service Workers caches instead of AppCache. The NewTab page itself will get primed with the newtab preloader, that will give a chance for the service worker to download any distribution data from the Tiles service.
Assignee: mzhilyaev → mcaceres
Blocks: Sprint_CS_S2
Iteration: --- → 43.2 - Sep 7
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.