Git Product home page Git Product logo

Comments (3)

a-sully avatar a-sully commented on August 13, 2024

From your response on the other issue:

Consider I have a local developer server established on localhost:5500 that I had been served files from directory A during session one (let's call it – SESS_ONE), but 5 minutes later I served different files from directory B on the same origin of localhost:5500, yet as a new session (let's call it – SESS_TWO).

My question is as follows: Does OPFS override (should I say overwrite?) the data saved during SESS_ONE the files served from directory A in favour of directory B persistence during new re-established SESS_TWO ? As far as I do understand OPFS provides a single bucket per origin, unless those buckets are IDed internally, otherwise OPFS is what says "per origin" and that specific origin should be reserved for particular directory N? Could you elaborate a bit further on, please . I tried to dig into specification, but could not find much about it. Plus we all know that depending on user-agent vendors the implementation can slightly differ. To underline, I am particularly interested in cases of Chrome / Microsoft Edge .

For starters, the spec doesn't mention "OPFS" because there may be more than one file system per origin. See #92

The question of whether or not you'll get the same file system instance in SESS_ONE and SESS_TWO has the same answer as whether or not you'll get the same IndexedDB instance. Which is a hint that you're looking in the wrong spec :)

The FS spec specifies the algorithm for getDirectory(). A local storage bottle map is obtained in Step 2. (What the heck is a Storage Bottle? See https://storage.spec.whatwg.org/#model) Where that local storage bottle map comes from is defined by the Storage spec

from fs.

a-sully avatar a-sully commented on August 13, 2024

Does OPFS override (should I say overwrite?) the data

Can't you inspect the data in the OPFS (say, using https://github.com/tomayac/opfs-explorer/) at the start of SESS_TWO to check whether it contains any data?

from fs.

projektorius96 avatar projektorius96 commented on August 13, 2024

Does OPFS override (should I say overwrite?) the data

Can't you inspect the data in the OPFS (say, using https://github.com/tomayac/opfs-explorer/) at the start of SESS_TWO to check whether it contains any data?

Yes, technically I can perform a use-case and see the behaviour deductively.

from fs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.