As a user, I want to be able to retrieve my open tabs when I don't have a network connection so I can continue consuming content without interruption.
Acceptance Criteria (how do I know when I’m done?)
From some experiences we've had with Fennec (and possibly the major reason this was never enabled on release):
@cpeterso can we access the cache for open tabs today without needing to reload?
@cpeterso can we access the cache for open tabs today without needing to reload?
GV would need to do a some work to support this, but not a lot. Fennec and desktop Firefox have "offline mode" where they only load content available in the browser cache instead of the network. You can test in desktop Firefox using File menu > Work Offline.
But I don't know how well it works. If the browser cache is small, the user might load cached pages that don't look right because some important JS or CSS file was kicked out of the cache.
Here is the GV bug to add an offline mode API:
From backlog grooming discussion:
A lot of websites request the browser does NOT cache web content (Fennec does this). We will respect that request.
@liuche @cpeterso I just tested this again and it seems like it actually works now in Firefox Preview. It was definitely not working a month ago. Did we make any changes in GeckoView in the past month, such as in the way we cache sites or badging sites that have a ServiceWorker and work offline?
@liuche @cpeterso I just tested this again and it seems like it actually works now in Firefox Preview. It was definitely not working a month ago. Did we make any changes in GeckoView in the past month, such as in the way we cache sites or badging sites that have a ServiceWorker and work offline?
What are sites and steps you are using to test? AFAIK, no Gecko or GV changes related to offline browsing. Maybe you are testing a site with a ServiceWorker that handles offline mode itself (instead of Gecko forcing all requests to be served only from the browser cache)?
At a conference last week, someone brought up to me that Firefox mobile requires a refresh upon re-opening the app from sleep. Some use cases are:
What @adamopenweb describes is one of my main use cases for this - and this is a case where if I lost the page it's a huge inconvenience and in some cases could cost me money (e.g. having to buy another train ticket). The other use case is to be able to read a page offline, which is a fairly common practice (and not all pages play nicely with either reading mode or with Pocket unfortunately).
We discussed this feature in a meeting with QA, ENG, UX.
QA please test this and let us know what cases/scenarios this currently works.
Hi @vesta0 please see my findings below:
For the start I picked the first 10 websites from Top 100 Most Visited Websites by Search Traffic in 2019.
| Site | Internet OFF| Airplane ON|Net OFF(rr Fenix)| AirplaneON(rr Fenix)|
|:----:|:----------:|:-------:|:------:|:-------:|
| youtube |Site opened✅|Site opened✅ | Not opened ❌ | Not opened ❌ |
| wikipedia | Site opened✅| Site opened✅ | Not opened ❌ | Not opened ❌ |
| facebook | Site opened✅| Site opened✅ | Not opened ❌ | Not opened ❌ |
| twitter | Site opened✅ | Site opened✅ | Site opened✅ | Site opened✅ |
| amazon | Site opened✅ | Site opened✅ | Not opened ❌ | Not opened ❌ |
| imdb | Site opened✅ | Site opened✅| Not opened ❌ | Not opened ❌ |
| reddit | Site opened✅ | Site opened✅ | Not opened ❌ | Not opened ❌ |
| pinterest | Site opened✅ | Site opened✅ | Not opened ❌ | Not opened ❌ |
| ebay | Site opened✅ | Site opened✅ | Not opened ❌ | Not opened ❌ |
| tripadvisor | Site opened✅ | Site opened✅ | Not opened ❌ | Not opened ❌ |
| Site | Multitask to other app, turn Internet OFF, return to Fenix | Multitask to other app, turn Airplane ON, return to Fenix|
|:----:|:----------:|:-------:|
| youtube |Site opened ✅|Site opened ✅ |
| wikipedia |Site opened ✅|Site opened✅ |
| facebook |Site opened ✅|Site opened✅ |
| twitter | Site opened✅ | Site opened✅
| amazon | Site opened✅ | Not opened ❌ |
| imdb | Site opened✅ | Site opened✅|
| reddit | Site opened✅ | Not opened ❌ |
| pinterest | Site opened✅ | Site opened✅ |
| ebay | Site opened✅ | Site opened✅ |
| tripadvisor | Site opened✅ | Site opened✅ |
about:configbrowser.tabs.useCache and toggle it to true default state is false.| Site |Internet OFF, restart Fenix(browser.tabs.useCache is true) | Airplane ON, restart Fenix(browser.tabs.useCache is true)|
|:----:|:----------:|:-------:|
| youtube |Not opened ❌|Not opened ❌ |
| wikipedia |Not opened ❌|Not opened ❌ |
| facebook |Not opened ❌|Not opened ❌ |
| twitter |Site opened✅ | Site opened✅ |
| amazon | Not opened ❌ | Not opened ❌ |
| imdb | Not opened ❌ | Not opened ❌|
| reddit | Not opened ❌ | Not opened ❌ |
| pinterest | Not opened ❌ | Not opened ❌ |
| ebay | Not opened ❌ | Not opened ❌ |
| tripadvisor |Not opened ❌ | Not opened ❌ |
Also, I tried with https://www.mozilla.org/en-US/ and the page was loaded even after I restarted Fenix with the Internet Connection Off.
Note that in Google Chrome, after restarting the app, the URL bar state changes to Offline and the page is loaded even after a restart or refreshing the page.
I will remove the qa:needed until further notice
Thanks so much @abodea for the thorough testing!
@liuche @lime124 @kbrosnan based on the test results above, I consider the acceptance criteria met for this particular user case required for feature maturity. I have opened another issue to track the remaining use case for future: #6478
Most helpful comment
At a conference last week, someone brought up to me that Firefox mobile requires a refresh upon re-opening the app from sleep. Some use cases are: