Hacker News new | comments | show | ask | jobs | submit login

One limitation to this setup is that CloudFlare only caches CSS, JS, and images. It won't cache HTML or other dynamic content by default.

However, it IS possible to "trick" CloudFlare into caching this content, by abusing the way it looks at the file extension and headers returned from your servers. If you can find a way to serve all your markup as JSON / JSONP with a ".js" extension and proper caching headers, it will treat it the exact same as a static JavaScript file.

You can do this easily enough with a build/deploy script that sets the right headers in S3 metadata so that CloudFlare receives them with caching headers (Cache-Control, ETag, Expires, etc.)




You can add a page rule for your whole domain and set custom caching to "everything".




Applications are open for YC Winter 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: