Where do files get stored (and for how long) when using js-ipfs?

If I use IPFS in the browser, using the very simple script tag, what is the behavior of the storage of the IPFS data?

For instance, I can do

node.files.add(new node.types.Buffer('A brand new piece of data!'), (err, filesAdded) => {
      if (err) {
        return console.error('Error - ipfs add', err, res)

      filesAdded.forEach((file) => console.log('successfully stored', file.hash))

and that is now stored as Qmc4gYRkCewDhrNL3WLCSUCbJVYv9QtuBvJxHL5JkdPKbz. But I’m not running any IPFS client on my computer. I can see that my browser is connecting to bootstrap libp2p.io nodes, so I’m assuming it gets stored on their servers. But I’m wondering, how long will it be stored there? Is it pinned? Do these nodes always accept any data (is there a max size, etc.)?

I was thinking of building an application, and its really nice that the bootstrap nodes do store the data for a small time. I was basically wondering how long I have before I can have my own server pin the data to its on disk, and if a user actually needs to run the IPFS client in case the bootstrap nodes are down.

1 Like

Depending on the filesize it gets stored longer (large files get stored for a shorter time), it has been little over 3 years and your file is still stored. But it’s basically a chance of luck that decreases when your file is bigger.

note that this file doesn’t represent an average file, since this link has been on the forum and so has probably received a few clicks

(actually, there is an url click count of you expand the info about your post)