# How to Host Online Properly

**URL:** <https://discourse.threejs.org/t/how-to-host-online-properly/59678>\
**Category:** Questions\
**Tags:** hosting, modules\
**Created:** [December 27, 2023, 6:20am UTC](https://discourse.threejs.org/t/how-to-host-online-properly/59678 "2023-12-27T06:20:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldboy](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oldboy](https://discourse.threejs.org/u/oldboy)\
**Post date:** [December 27, 2023, 6:20am UTC](https://discourse.threejs.org/t/how-to-host-online-properly/59678/1 "2023-12-27T06:20:02Z")

</div>

I have never hosted a ThreeJS project before. I read the documentation, but it merely says to host the files. No detail beyond this was provided.

When building and testing, I was using the following code:

```
    <script async src="https://unpkg.com/es-module-shims@1.6.3/dist/es-module-shims.js"></script>
    <script type="importmap">
        {
            "imports": {
                "three": "https://unpkg.com/three@0.154.0/build/three.module.js",
                "three/addons/": "https://unpkg.com/three@0.154.0/examples/jsm/"
            }
        }
    </script>
</head>
<body>
    <script type="module" src="main.js"></script>
</body>

```

**Are `es-module-shims.js` version 1.6.3 and `three.module.js` version 0.154.0 up-to-date or are newer versions available?**

**Are there any security concerns that I should be aware of?**

**Is there anything else I should know?**

Anyways, thanks in advance!

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [December 27, 2023, 6:27am UTC](https://discourse.threejs.org/t/how-to-host-online-properly/59678/2 "2023-12-27T06:27:04Z")

</div>

> [@oldboy](#):
>
> Are there any security concerns that I should be aware of?

If you are using 3D models or textures - your assets become public property as soon as you put them online. There’s no way to prevent that or protect them - not much point in trying.

> [@oldboy](#):
>
> version 0.154.0 up-to-date or are newer versions available?

There are newer version of three but there were no significant updates since your 154.

> [@oldboy](#):
>
> Is there anything else I should know?

If you host big 3D models or textures - (1) loading will be slower than when you tested locally, sometimes way slower; (2) the bigger the assets you load, the more bandwidth usage, the higher the bill - so optimise the assets and use some CDN with edge caching.

---

<div class="post-metadata">

**Author:** ![oldboy](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oldboy](https://discourse.threejs.org/u/oldboy)\
**Post date:** [December 27, 2023, 8:52am UTC](https://discourse.threejs.org/t/how-to-host-online-properly/59678/3 "2023-12-27T08:52:03Z")

</div>

cool. thx for the info \<3

what exactly was updated in the newer versions?

---

<div class="post-metadata">

**Author:** ![oldboy](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oldboy](https://discourse.threejs.org/u/oldboy)\
**Post date:** [December 31, 2023, 7:41am UTC](https://discourse.threejs.org/t/how-to-host-online-properly/59678/4 "2023-12-31T07:41:04Z")

</div>

is it possible to download these files and host them directly? would this increase performance? is it not suggested to do so?

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [December 31, 2023, 7:54am UTC](https://discourse.threejs.org/t/how-to-host-online-properly/59678/5 "2023-12-31T07:54:02Z")

</div>

> [@oldboy](#):
>
> is it possible to download these files and host them directly?

Yes, browser also does that automatically to some extent by caching requests.

> [@oldboy](#):
>
> would this increase performance?

Nope, irrelevant.
