Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Where do you host your CSS files?
5 points by diceduckmonk on Sept 5, 2022 | hide | past | favorite | 6 comments
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?




Same host and same domain.

Moving to another domain/host will incur additional latency on page load times.


Caching 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.


I 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.


How 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?


Usually on the server where nginx is installed.


`/static/styles.min.css` usually.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: