Replies: 1 comment 1 reply
-
This is an interesting idea, but CDNs for static resources have started to fall out of fashion for a few reasons lately. They're not always faster1 and there's been increased privacy concerns lately. Security isn't too much of a concern nowadays if you use Subresource Integrity, but long-term availability still is. A local file will always be available on the same server in the future, while free public CDNs don't make any guarantees about availability. It makes sense to use a CDN if you host your project on a platform where you pay for bandwidth, still. That said, we don't have an official platform we can provide CDN builds on.
The downloaded file size will be exactly the same, regardless of whether you use a CDN or not.
This is only the case if the file can be reused from another project on the same domain name. I don't expect this to be very common on most websites. I believe dedicated platforms like gotm.io already use a shared WASM runtime.
It's possible to enable gzip/Brotli compression on your own web server, but this is unfortunately not done by all hosts out there for WASM files (let alone PCK). This could be an argument to use CDNs to circumvent this issue on hosts that don't use gzip/Brotli compression… but only if they don't use a CSP that prevents loading external resources.
If you don't change the engine version between two updates, the Footnotes
|
Beta Was this translation helpful? Give feedback.
-
Can we add a checkbox to the Web export to use a public cdn hosted index.wasm file?
The cdn could have the index.wasm debug/release for each version of Godot.
Could deploy new index.wasm versions to the cdn here: https://github.com/godotengine/godot/blob/master/.github/workflows/web_builds.yml
The correct cdn url will be selected automatically based on Godot version and debug/release.
Benefits
Example bundle size
Some people already host their own shared engine wasm:
https://www.reddit.com/r/godot/comments/pjuqsr/html5_could_godots_wasm_file_be_hosted_in_a/
But a checkbox could be easier.
Beta Was this translation helpful? Give feedback.
All reactions