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

**URL:** <https://discuss.ipfs.tech/t/where-do-files-get-stored-and-for-how-long-when-using-js-ipfs/4517>\
**Category:** js-ipfs\
**Tags:** js-ipfs\
**Created:** [December 21, 2018, 4:16pm UTC](https://discuss.ipfs.tech/t/where-do-files-get-stored-and-for-how-long-when-using-js-ipfs/4517 "2018-12-21T16:16:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![schollz](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/schollz/32/2372_2.png) [@schollz](https://discuss.ipfs.tech/u/schollz)\
**Post date:** [December 21, 2018, 4:16pm UTC](https://discuss.ipfs.tech/t/where-do-files-get-stored-and-for-how-long-when-using-js-ipfs/4517/1 "2018-12-21T16:16:46Z")

</div>

If I use IPFS in the browser, using the very simple [script tag](https://github.com/ipfs/js-ipfs/tree/master/examples/browser-script-tag), what is the behavior of the storage of the IPFS data?

For instance, I can do

```auto
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](https://ipfs.io/ipfs/Qmc4gYRkCewDhrNL3WLCSUCbJVYv9QtuBvJxHL5JkdPKbz). But I’m not running any IPFS client on my computer. I can see that my browser is connecting to bootstrap [libp2p.io](http://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.

---

<div class="post-metadata">

**Author:** ![FurriousFox](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/furriousfox/32/6466_2.png) [@FurriousFox](https://discuss.ipfs.tech/u/FurriousFox)\
**Post date:** [May 17, 2022, 2:26pm UTC](https://discuss.ipfs.tech/t/where-do-files-get-stored-and-for-how-long-when-using-js-ipfs/4517/2 "2022-05-17T14:26:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FurriousFox](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/furriousfox/32/6466_2.png) [@FurriousFox](https://discuss.ipfs.tech/u/FurriousFox)\
**Post date:** [May 17, 2022, 2:31pm UTC](https://discuss.ipfs.tech/t/where-do-files-get-stored-and-for-how-long-when-using-js-ipfs/4517/3 "2022-05-17T14:31:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![FurriousFox](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/furriousfox/32/6466_2.png) [@FurriousFox](https://discuss.ipfs.tech/u/FurriousFox)\
**Post date:** [May 17, 2022, 2:34pm UTC](https://discuss.ipfs.tech/t/where-do-files-get-stored-and-for-how-long-when-using-js-ipfs/4517/4 "2022-05-17T14:34:13Z")

</div>

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