# How to re-initialize IPFS node with same repository on page refresh

**URL:** <https://discuss.ipfs.tech/t/how-to-re-initialize-ipfs-node-with-same-repository-on-page-refresh/15374>\
**Category:** Help\
**Tags:** js-ipfs\
**Created:** [October 21, 2022, 1:40pm UTC](https://discuss.ipfs.tech/t/how-to-re-initialize-ipfs-node-with-same-repository-on-page-refresh/15374 "2022-10-21T13:40:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Codys12](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/codys12/32/7082_2.png) [@Codys12](https://discuss.ipfs.tech/u/Codys12)\
**Post date:** [October 21, 2022, 1:40pm UTC](https://discuss.ipfs.tech/t/how-to-re-initialize-ipfs-node-with-same-repository-on-page-refresh/15374/1 "2022-10-21T13:40:44Z")

</div>

I am building a browser-based application that is using js-ipfs to allow users to provide their content to the network by sharing the CID. I want the ability to have repo continuity between page refreshes. What I have been doing, and what I have seen most online is  
`const node = IPFS.create(repo: Math.random())`

I would like to be able to re-initialize the node from the previous repo, but I cannot find how to do it without creating a new repo in the process. The Repo mechanic is something that is very useful to my application, and something that I want manual control over by creating a new repo whenever the files are finalized.

When a new node is created, does it resume streaming the contents of all existing repos in indexedDB?  
If not, I would like to be able to resume streaming all repos to the node on page restart.

Thank you.

---

<div class="post-metadata">

**Author:** ![Discordian](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/discordian/32/4692_2.png) [@Discordian](https://discuss.ipfs.tech/u/Discordian)\
**Post date:** [October 25, 2022, 8:09pm UTC](https://discuss.ipfs.tech/t/how-to-re-initialize-ipfs-node-with-same-repository-on-page-refresh/15374/2 "2022-10-25T20:09:08Z")

</div>

I believe I’ve answered this [here](https://discuss.ipfs.tech/t/js-ipfs-broke-error-unhandled-rejection-lockexistserror-lock-already-being-held-for-file-ipfs-repo-lock/11172/12).
