> For the complete documentation index, see [llms.txt](https://bimwhale.gitbook.io/ifc-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bimwhale.gitbook.io/ifc-js/saving-the-scene/introduction.md).

# Introduction

Let's ask ourselves this simple question:

{% hint style="info" %}
Why do we need to save the scene?
{% endhint %}

Let's say that we have a large file. Assume that it takes `>1min` to parse the file. Now, let's assume that we want to view the result many times. We might even turn off our computer in-between viewings.

{% hint style="warning" %}
How can we view the file, without re-parsing it?
{% endhint %}

One might suggest using [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) (read more [here](https://www.w3schools.com/jsref/prop_win_localstorage.asp)). However, `localStorage` is limited to about 5MB and can contain only strings and is not accessible from `Web Workers` ([1](https://web.dev/storage-for-the-web/)).

I suggest using [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) instead. `IndexedDB` is a way for you to persistently store data inside a user's browser ([2](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB)). Read more [here](https://javascript.info/indexeddb).
