I have Apache HTTPD configured to add a cache header to requests for most static content:
ExpiresActive On
ExpiresDefault "access plus 1 year"
# Force JNLP and BSH files to expire immediately so updates are checked for
# and seen (We need this so we see changes in the dynamic content in both)
ExpiresByType application/x-java-jnlp-file "now"
ExpiresByType application/x-bsh "now"
How can I disable this caching for any request where the UserAgent
contains the string JNLP? When the request comes from the User Agent JNLP (for example "User-Agent: JNLP/6.0 javaws/1.6.0_12 (b04) Java/1.6.0_12
") I don't want any Cache-Control
or other cache-related headers on the HTTP response.
I can find configuration examples for several things based on user agent, but I cannot figure out how to configure caching depending on the user agent.