-
Notifications
You must be signed in to change notification settings - Fork 16
Description
We have CloudFlare now in the mix for the HG domain.
This is not a big priority, but it may help as we consider new hosting for HG.
@bogdankharchenko mentioned we'd want to set some Etags in the Laravel middleware for the public-facing pages so CloudFlare has a cache invalidation method to know how / when to refresh the caching from the origin server.
For JS / CSS files, I see we have hash values worked into the paths that I suspect change automatically in the application HTML.
/livewire/livewire.min.js?id=44144c23
/build/assets/app-4ed993c7.js
Though, there are also some JS files that don't appear to have caching invalidation hashes, like
/vendors/fullcalendar/packages/core/main.min.js and a couple other FullCalendar.
We could set Etags at the web host (Apache / Nginx) level, but we'd prefer for the application to handle such things so we're not dependent on server-level configuration that would break if we move hosts or servers.
For binary files, like images, it seems some of the theme images may have caching tags worked into the files, like
/build/assets/hackgreenville-banner-7f39bbf1.jpg
However, there are a number of other content images, like on the homepage, which don't have hash values in the path.
For images, PDFs, and such that are content, and not part of the asset / build / theming, would we want / need to move those to dedicated block-level storage (like S3) and rely on E-tags in the response headers from the block storage host side that are set when new files are pushed up? Or, is there another way to do this for images that are more content / database related and not part of the CSS / JS building?
