这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@return42
Copy link
Member

@return42 return42 commented Mar 6, 2025

The static files (CSS & JS) are cached in the browser for one year. If we have changes to the CSS or JS files, these are not yet transported to the client by default, which causes problems and irritations on the client side:

Related:

The static files (CSS & JS) are cached in the browser for one year.  If we have
changes to the CSS or JS files, these are not yet transported to the client by
default, which causes problems and irritations on the client side.

Related:

- searxng#4415 (comment)
- searxng#932

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@dalf
Copy link
Contributor

dalf commented Mar 6, 2025

As far I remember, and I can't remember why, this can't be enabled outside the docker image.

@return42
Copy link
Member Author

return42 commented Mar 6, 2025

As far I remember, and I can't remember why, this can't be enabled outside the docker image.

Its a long time ago .. can't remember last state of this topic, but may you refer to this:

return42 added a commit to return42/searxng that referenced this pull request Mar 6, 2025
As long we don't have a working solution for cache busting [3][4] we should not
set an expire time in thw uWSGI config.

The default procedure in every web browser is the "304 Not Modified" [2] and
this default procedure should also be sufficient for us as long as we have not
implemented a complete alternative (cache busting) / form [1]

> By default uWSGI will add a Last-Modified [2] header to all static responses,
> and will honor the If-Modified-Since [2] request header.

[1] https://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html#setting-the-expires-headers
[2] https://developer.mozilla.org/de/docs/Web/HTTP/Status/304
[3] searxng#4433
[4] searxng#964

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42
Copy link
Member Author

return42 commented Mar 6, 2025

For a interim solution I send PR:

return42 added a commit that referenced this pull request Mar 8, 2025
As long we don't have a working solution for cache busting [3][4] we should not
set an expire time in thw uWSGI config.

The default procedure in every web browser is the "304 Not Modified" [2] and
this default procedure should also be sufficient for us as long as we have not
implemented a complete alternative (cache busting) / form [1]

> By default uWSGI will add a Last-Modified [2] header to all static responses,
> and will honor the If-Modified-Since [2] request header.

[1] https://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html#setting-the-expires-headers
[2] https://developer.mozilla.org/de/docs/Web/HTTP/Status/304
[3] #4433
[4] #964

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42
Copy link
Member Author

@return42 return42 closed this Jul 19, 2025
@return42 return42 deleted the enable-css-cache-busting branch July 19, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants