4 ms·
Ask HN: Where do you host your CSS files?
We currently have a web app hosted on the cloud. The HTTP server does server-side rendering, including serving up static CSS and SVG files.
For reasons, the web server framework doesn't support
caching out-of-the-box and we hand-roll our own.
I thought we might as well complexify our deployment step instead and reap some performance benefits. Immediately, I thought to use Amazon S3 for the CSS files. Does any one else do this? Is there something lower latency than S3?
- theandrewbailey 4y agoSame host and same domain. Moving to another domain/host will incur additional latency on page load times.
- FastEatSlow 4y agoCaching should be handled by the proxy in front of your server in that case. Adding another host is unlikely to improve performance, especially with HTTP/2.
- guilherme-puida 4y ago`/static/styles.min.css` usually.
- leros 4y agoI host all statics (JavaScript, css, images, etc) from the same CDN host. I've used various options over the years. Cloudflare Pages, Netlify, Firebase Hosting, etc. They're all fine. If you're in AWS land already, Cloudfront is Amazon's CDN and it's a great solution too. Cloudfront specifically can sit in front of S3 buckets so that assets get cached.
- lysergia 4y agoHow much would you have to pay for Cloudfront if you, say, got multiple blogposts featured on HN's frontpage quite regularly? Presuming you're not serving that many images or other assets?
- danwee 4y agoUsually on the server where nginx is installed.