12 ms·
Firefox 111.0 enabled Origin private file system access
- HollowEyes 4y agoNo prompts? Sorry do I have to launch the browser with a specific flag? Worried a site can just swamp a local filesystem.
- iddan 4y agoThe OPFS is subject to browser quota restrictions.
- sgbeal 4y ago> The OPFS is subject to browser quota restrictions. FWIW, 256mb last i checked (summer 2022). Perhaps less on mobile browsers, but that's just speculation.
- ur-whale 4y agoWhich means nothing unless the defaults are restrictive. What are the default browser quota restrictions on install?
- maccard 4y agoDocs here - https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Browser_storage_limits_and_eviction_criteria https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_A...
- madeofpalk 4y agoOPFS doesn't really change this concern that much. IndexedDB already allows for relatively arbitary blobs of data to be stored per site (subject to existing quotas)
- account42 4y agoIndexedDB should also be disabled by default. Adding more and more storage options instead of restricting the existing ones that are already being abused is madness.
- lol768 4y agoSo any sufficiently motivated/funded malicious actor who can register a whole bundle of domains can use up 50% of the entire free space on my disk? Am I getting this right? Is the only defense against this the requirement for per-origin permission to be granted?
- roca 4y agoThat's been true for over a decade. Hasn't happened in the wild though AFAIK. I don't think there's an incentive for anyone to do this.
- secondcoming 4y agoFirefox swamping the disk is already an issue. Mine has several gigabytes of random crap cached, and I'm not the only one.
- KyeRussell 4y ago“Several gigabytes” for a browser cache is not abnormal, nor “swamping the disk”. Welcome to the web.
- makapuf 4y agoNowadays "several gigabytes" can also be read as "almost a percent" for a 1TB disk, which for an app so central is not outrageous to me. Well maybe it could be less for smaller 256G disks.
- michaelt 4y agoRight now, today, Apple will sell you a brand new phone with only 64GB of storage. And that's for users whose budget stretches to a brand new iphone - plenty of people spend less. The modern web isn't just for people browsing from high-spec workstations and gaming PCs.
- daneel_w 4y agoI run desktop (not mobile) Firefox with an in-memory cache only. My opinion is that on-disk cache with several days (or weeks) old content is almost entirely useless, and that the most beneficial cache use is what you fetch/reuse through a single day of running browser. Here's how you can "make the switch": First of all, clear your disk cache entirely. Then, head into "about:config" and change accordingly: browser.cache.disk.enable -> false browser.cache.disk.smart_size.enabled -> false browser.cache.disk_cache_ssl -> false browser.cache.offline.enable -> false browser.cache.memory.enable -> true browser.cache.memory.capacity -> 512000 browser.privatebrowsing.forceMediaMemoryCache -> true The number 512000 is in kilobytes. Adjust to preference. Firefox will still do some caching to disk, but these settings stop the most pressing disk writes. You may confirm the change by visiting "about:cache".
- ar9av 4y agoI, on the other hand, am actually annoyed that Mozilla doesn't support the File System Access API. I understand that there are security concerns that need to be evaluated more, but the API has to explicitly request for user permissions anyways and has to re-request user permissions when the tab is closed. I'd much rather live in a world where I can briefly use a web app to do some task than be forced to install a myriad of native desktop apps that have unsandboxed and unpermissioned access to everything on my system. Origin private file system access seems cool, albeit a half measure. Seems like a better alternative than putting blobs into IndexedDB.
- domh 4y agoYeah this is my take too. I generally appreciate and support Mozilla, but this time I feel like they're on the wrong side. If I can use a webapp that persists a file to my filesystem, it means I can have a local backup without having to make an account for a site.
- eshnil 4y agoSaving a file is easily implementable without a Filesystem access API. See https://draw.io/ https://draw.io/ as an example.
- esperent 4y agoDraw.io's local file saving is clunky as hell and I'm sure even that was an absolute pain for them to get working.
- eshnil 4y agoI actually implemented it recently in one of my open-source apps. It's 6 lines of Javascript: Create an <a> element, set the data in its href with: element.setAttribute("href","data:text/plain;charset=utf-8," +encodeURIComponent(content)) and element.click() followed by document.body.removeChild(element); This works perfectly fine for saving single files. FileSystem access API is useful when entire directory needs to be stored and perhaps without the standard SaveAs.. UI.
- austin-cheney 4y agoI got tired of waiting for this and all the constraints that come with it. So I wrote my own localhost solution with Node, web sockets, and DOM traversal that ended up being faster than the equivalent GUI functionality provided by the OS.
- mtrycz2 4y agoI don't want this in my browser. Why would anyone want this? How do I disable it?
- madeofpalk 4y agoWhy not? It's just a bucket of space to store arbitary bits, very similar to IndexedDB, but using file system semantics rather than database.
- mtrycz2 4y agoSo it is a sandboxed, abstract filesystem, not rw access to my actual filesystem? The first lines of the description say > This API allows interaction with files on a user's local device, or on a user-accessible network file system.
- sgbeal 4y ago> So it is a sandboxed, abstract filesystem, not rw access to my actual filesystem? It's sandboxed storage which lives in your filesystem but is only available via the browser and is sandboxed on a per-HTTP-origin basis. That makes it impossible[^1], e.g., for x.y.com to sideload data into, or exfiltrate from, y.z.com. How the files are actually stored on your filesystem is not defined by the in-progress standards doc, but they are not stored as-is because doing so would open them up to security issues from out-of-browser sources, as well as potential file-locking problems from out-of-browser apps. [^1]: Edit: as a responder points out: "impossible" for a given value of "impossible"
- fangorn 4y agoIt's only impossible until someone finds a way...
- worksonmine 4y ago> lives in your filesystem but is only available via the browser Strange implementation if that's the case. While I don't want my browser to give a page arbitrary access to my files, a use-case I can see is sharing files between apps and websites. Say, obsidian for organizing, vim for editing and some cloud for backup. You must have confused the part of it only being available to the browser, I don't see how that's even technically possible.
- resoluteteeth 4y agoThis is great news. I think at least all the desktop browsers support it now so it should hopefully finally be possible to start using disk-persisted sqlite in webapps with decent performance.
- dieulot 4y agoFull release notes: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/111 https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Rel...
- Mister_Snuggles 4y agoSo opening a directory picker and allowing access to user-selected files is fine, however opening a serial port picker and allowing access to user-selected serial ports is not[0]. My use-case is a web-based system which includes, among other things, a payment function. I'm building an interface based on WebSerial to initiate transactions on a USB-connected Pin Pad[1]. This works beautifully in some Chromium-based browsers, but nowhere else[2]. This bothers me because it represents a dependency on Chromium and they could pull the rug out on WebSerial support any time. If other browsers supported it at least I'd have a fallback plan. [0] https://mozilla.github.io/standards-positions/#webserial https://mozilla.github.io/standards-positions/#webserial [1] For reference, the USB connection only exposes a control channel. You can initiate transactions and monitor their status, but the Pin Pad has an ethernet connection for actual communication to the payment processor. There is an option to use REST services provided by the payment processor to do the same thing, however that is significantly more development effort in our application. [2] https://developer.mozilla.org/en-US/docs/Web/API/Serial#browser_compatibility https://developer.mozilla.org/en-US/docs/Web/API/Serial#brow...
- kibwen 4y agoThe link above is to a different section of the page, giving the mistaken impression that this is unfettered access to the local file system, which it isn't. Quoting the appropriate section further down the page: The origin private file system (OPFS) is a storage endpoint private to the origin of the page, providing optional access to a special kind of file that is highly optimized for performance, for example, by offering in-place and exclusive write access to a file's content. Storing data in the OPFS is similar to storing data in any other browser-provided storage mechanism that's private to the origin of the page (for example the IndexedDB API). This means that files in the OPFS differ from files selected using a picker in the following ways: - Permission prompts are not required to access files in the OPFS. - Clearing data for the site deletes the OPFS. - The OPFS is subject to browser quota restrictions.
- hedora 4y ago> Permission prompts are not required to access files in the OPFS. Surely, it prompts at some point. Otherwise this is an unblockable cookie mechanism. Presumably there is some way to disable it, right?
- mhoad 4y agoHow is it different from window.localStorage.setItem('user-id', 'user123'); I look at it like so: Local Storage: Key Value IndexedDB: Structured Document Database OPFS: BYO File Format But all operate under the same restrictions and set of considerations.
- kibwen 4y agoCookies already don't prompt, so I'm not sure that's the best comparison. In addition, while cookies can be created by one origin and read by another origin (a.k.a. "third-party cookies", which Firefox has been trying to deprecate for a while now), this API is private to each origin, making it useless for cross-site tracking. As for disabling this, I assume these are the appropriate pages in the docs: https://support.mozilla.org/en-US/kb/storage https://support.mozilla.org/en-US/kb/storage https://support.mozilla.org/en-US/kb/block-websites-storing-cookies-site-data-firefox https://support.mozilla.org/en-US/kb/block-websites-storing-... .
- amphitheatre 4y agoWould this file system access API finally allow use to use TiddlyWiki in the browser without add-ons or external tools finally? It's one of the sticking points for me for using it.
- dugmartin 4y agoIt looks like the maintainers of https://vscode.dev/ https://vscode.dev/ need to fix their browser sniffing to allow Firefox 111 to work.
- butz 4y ago<insert obligatory rant about unremovable Extensions button here>
- CharlesW 4y agoIn case anyone else is curious: https://caniuse.com/native-filesystem-api https://caniuse.com/native-filesystem-api
- dur-randir 4y agoHow do I turn this crap off? Or is this so important for me that I can't?