Open asutherland opened 5 years ago
Note that "title" is optional for Background Fetch, but Background Fetch also explicitly has a bunch of fetch requests that are fundamentally self-descriptive if not necessarily human readable or understandable.
I quite like that idea—we haven't figured out a clear way of listing the events, but I can definitely see this being useful. @mugdhalakhani @engedy FYI
Thanks for this suggestion, asutherland@. Here are my thoughts: 1.Browsers generally don't trust strings provided by the website. There's a lot of input sanitization we'll need to do, and even when a string passes this sanitization, we may see strings like: "This is due to a browser bug, just click allow" or “CLICK ALLOW TO PREVENT THE BROWSER DELETING YOUR DOCUMENTS" to manipulate user decision. How would you prevent that? And if we can't, is this title string still effective for the original purpose?
It seems useful for browser UX to surface to the user what the ServiceWorker claims it is doing similar to Background Fetch's title mechanism. Especially since the SW presumably would perform different actions for different tags and it's otherwise problematic for the browser to expose the tags as they would almost certainly not be localized and probably have a tendency to remain constant over time while an accurate human-readable description would change. This could allow the user to control the different sync registrations separately as well, altering their run frequency/etc. to their own desires.