Skip to content

Conversation

davidharting
Copy link
Owner

No description provided.

The goal is to serve index.html from the edge and then in the background update the cloud flare cache

The test is failing right now. This is because there is a livewire component on the home page which is overriding caching behavior. I think it has something to do with a default back-button browser history setting
So that test passes and we can control the caching headers
The build assets are hashed. But just blankyly caching for a year based on file ending is more dangerous. Then I have to remember to change the name of a file every time I want to update it. For instance, with things like resume.pdf.

I can always add that in later if i want to
@davidharting
Copy link
Owner Author

davidharting commented Aug 12, 2025

Before merging:

❯ curl --head https://davidharting.com
HTTP/2 200
date: Tue, 12 Aug 2025 21:29:32 GMT
content-type: text/html; charset=UTF-8
alt-svc: h3=":443"; ma=86400
cache-control: max-age=0, must-revalidate, no-cache, no-store, private
expires: Fri, 01 Jan 1990 00:00:00 GMT
pragma: no-cache
server: cloudflare
x-powered-by: PHP/8.3.20
cf-cache-status: DYNAMIC
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=NWDt1j8O3WEktg4UuPxxXeoLLG1z2gvczHJhtUQs1QdRhDS7kkJBm0H4yaMwdoiecx3PZZTQwJb%2FbEEqZeEmkYIylG4PNAAJC7KzZW1RTtg%3D"}]}
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
set-cookie: XSRF-TOKEN=eyJpdiI6Ilk0MWNBT1lrVVNWQU8wTWZrK0JJclE9PSIsInZhbHVlIjoicW9JaTBiam1xdmVjb3RidFdFdzJlTDVaWHhpNTJ2dGxLQ1M4aGs4TDRXMmlZWmM3UE5JZWVDeEdxbEFRYXdQV1ppL1k4a2NodXBtbld5OTVLdkpzUHhtdDYzTkVGamhxcjZZVWJoYWl3dzRJakJFWXBLd1VncjZ1aVJLU1NmS0QiLCJtYWMiOiJiNWNiMTNjOTc3MTdkZTRkNTYyODMwYTk3ODY0ZTgwY2VmZDRkNzQzOGVjNjZhNTMxZDNlMjEyZTcyZDAyMWYyIiwidGFnIjoiIn0%3D; SameSite=Lax; Secure; Path=/; Max-Age=7200; Expires=Tue, 12 Aug 2025 23:24:15 GMT
set-cookie: davidhartingcom_session=eyJpdiI6Ik93RXFQU3lRMVpmUDZTbFVaS296MHc9PSIsInZhbHVlIjoieHV6UHlFZzQzb2pJU281UlcwM0U2MTNlRjVZVURjRFNGNnNDcU1XWTlnZktBSmtkak9VZjdjVXpVeFc4cDNHZU4xTGNPeW9RbHRrTFM1MnJoaFYvR0NoMXNTcVppREFaL1lWZE5kU2hWM3NabXJNNEVYSGdlZWEvNHRQWFd5TmoiLCJtYWMiOiI5NWE0MjBlZTEyYjA2Nzc5OTMxZDU3Yzc0ZmVhYmI0MmM2NDY2YWI0YWZkZjQxOWZmYzFkMjJjMTRjOTg5ZGNlIiwidGFnIjoiIn0%3D; HttpOnly; SameSite=Lax; Secure; Path=/; Max-Age=7200; Expires=Tue, 12 Aug 2025 23:24:15 GMT
cf-ray: 96e311998d2a4fce-MIA


❯ curl --head https://davidharting.com/build/assets/app-9senzXA6.css
HTTP/2 200
date: Tue, 12 Aug 2025 21:34:10 GMT
content-type: text/css; charset=utf-8
alt-svc: h3=":443"; ma=86400
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Nb0hM349o9ebcKIMFP6ZETQw1HlGDZjv9QR1VQDTB9iu3zYiepR%2FCe6IxojnlVVB4iLED9h1Zakz7pY%2FlQgpm7FWCE9yrKdwko3gn63IQdQ%3D"}]}
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
last-modified: Mon, 05 May 2025 02:33:15 GMT
server: cloudflare
vary: Accept-Encoding
age: 319
cache-control: max-age=14400
cf-cache-status: HIT
etag: W/"d9nviyxmxla894j1-br"
cf-ray: 96e318628e8907ba-MIA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant