Hi,
I'm preparing an update for www.loopple.com and I was wondering what you, as developers, would prefer. The downloaded file now is a simple index.html file with CDN links to Javascript, CSS, and images files. I was thinking of changing the download file to a ZIP that includes the index.html + assets folder.
Eventually offer both and let the user choose how he wants to download it.
Thank you for your answer @pixtron!
What CDN are you using? Many CDN’s, like AWS Cloudfront, offer the ability to zip automatically for you, so you as a developer really don’t have to think about this. Cloudfront offers gzip and Brotli compression options... You can use a CDN for your own assets, which will (optionally) zip the files for you before sending the zip to the users browser, and you can use the CDN resources for third-party assets. You get the best of both!
My personal preference is to keep assets separate... Each project is different and has unique needs, so your use case may not see benefits from this approach, but in my experience there are some benefits to this approach:
Hi @hephalump and thank you for the answer, this is really helpful!
Would it be possible to inline the JS and CSS so it is only x single index.html file?
Hi @stephenafamo. It is possible but the CSS/js files have over 1000 lines of code and I think the index.html will have too much content.
I don't think that is too much of a problem.
Since it is a single page app, all of that will have to be downloaded anyway, but having it as a single file really simplifies the deployment.
It sounds good and makes sense, thank you very much for help!