Closed Jarred-Sumner closed 3 years ago
This is not so much a spec issue as more of an implementation issue. But this is definitely something we're considering/working on in Chrome. The exact behavior we're still trying to figure out, but we are very much aware of the problem.
Say you're building a browser-based bundler.
The user makes a change to their local code and refreshes the page.
Immediately, they're hit with a permissions request.
Rather than instantly showing a permissions dialog, you might provide a little context – something like this:
Then, they make a small tweak. Maybe change a button color in css. And click refresh.
Then they see this again:
At this point, they're probably getting a little annoyed and might go back to using a Node.js-based bundler.
As a workaround, the product could suggest the user keep a separate tab open. Something like this (notice the link at the bottom):
But it's not great. Native apps don't have to ask you to run two copies of the same app in order to maintain access to a directory.
I understand there are real privacy concerns with an API like this and any change like this would require careful consideration. But without some kind of persistent permissioning, its tough to see how web-based software that needs persistent filesystem access can provide a good user experience.