Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Cache-control

On 04/08/2020 19:38, Greg Wilkins wrote:
John,

Can you capture some examples of headers from requests and responses that are not being cached.

Closer inspection shows that pages are being cached, even though the browsers don't show any cached data under "Memory" in the dev tools. The header I'm getting is "Cache-control: max-age=0" and I get a 304 response to tell the browser to use the cached copy. I'm not generating the Cache-control header in my webapp.

The fact that the CSS sometimes doesn't load makes me think that I'm sometimes not getting the response...?

Also can you describe how you are serving the content as well?  Is the CSS just static content? Do you have any filters involved?

The CSS is static, so is being served by the default servlet. JavaScript goes through a filter which does I18N translation for error messages etc. on specially-tagged strings. When the CSS fails to load, I haven't looked to see if the JS has loaded. Next time this happens, I'll have a look at headers etc. to see if I can find out any more.

Thanks,
--
John English


Back to the top