-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
count.js forbids caching #342
Comments
|
a workaround, using an apache proxy, looks like: |
|
It does use caching, but ETag based caching/validation; so the request sends: And it responds with 304 Not Modified: This is the default way Netlify handles things; I think their argument is that deploys and rollbacks are easier with this, which makes sense. I can override it with the config file; maybe adding a small 30-minute cache or so might make sense, but for most purposes it's really a micro-optimisation at best. |
Hmm... but this also happens with a local deployment. Maybe I screwed up my etag setup? I usually don't send those here because of the privacy implications, and it seems they don't get passed through my Apache proxy either... How often does |
Oh, right; I missed that 😅 I was talking about the gc.zgo.at CDN. I need to expand the cache parameters for the static file server over here – right now it's a pretty simplistic and applies to everything.
Not that often, but it does change occasionally and having people use an outdated version from a week ago has the potential to cause a lot of confusion (and possibly wrong stats in case of new features). It's a pretty small file, and the overhead is really minimal even on low bandwidth/high-latency connections. |
Sure, but I'm also optimizing for "less TCP roundtrips" so latency matters, although Sorry to bother you with "home server deployments" though... ;) |
It's a first-class use case; and I spent quite a bit of time to ensure it works well. So yeah, it's not a "bother" :-) |
It seems like the
count.jsfile, as loaded by the following "site code" blob:Never gets cached. Here, a reload of the page yields a full
GETrequest on the resource, and the server dutifully responds with a200status code, with the following header:Shouldn't there be a way to cache (yet still run) that code when we visit a different page? I know that I can inline the script directly in the
<script>tag. That saves a TCP request, but then you add 2K to all page loads...The text was updated successfully, but these errors were encountered: