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
Is cache busting supported? #2124
Comments
Huh, GitHub pages' cache control has always worked well for me.. no, there's no builtin way to do this today. I'd be open to introducing an option to enable this, I don't think I want to turn it on unconditionally since a properly configured server ought not to need it, and it will mean that every file changes when regenerating the docs. |
Gotcha, thanks for the response. I'm using Chrome so the browser cache may be pretty aggressive. For now, the hard reload works as a workaround for me. |
... turns out this is harder than initially anticipated, because we can't create the |
I appreciate you looking into this! I'm okay with closing this issue as won't do given the amount of effort required. |
I'll leave it open for a while longer - might come up with a clever way of doing things now that I can think about the issue in the background while doing other things now :) |
Apparently I was hung up on generating the cache query string from the file contents in January, which would be the ideal solution, but isn't strictly necessary, since it could also use the generation time, which is much simpler, though it will cause re-fetching even if nothing has changed if you rebuild the docs. |
Thanks for the update! |
Question
Does TypeDoc support cache busting for static assets like CSS and JS?
I have a TypeDoc site hosted on GitHub Pages: https://github.com/remarkablemark/cypress-cucumber-steps
Sometimes I notice that search is behind because
assets/search.js
is cached by the browser. It's only when I do a hard reload that the search is up-to-date.I know that some other site generators append a query string with a version/hash like
?v=123
to bust the cache.Search terms
cache, bust, static, asset, css, js
The text was updated successfully, but these errors were encountered: