1
我已經apache httpd的配置添加一個緩存頭請求大多數靜態內容:使用Apache httpd,如何爲給定的UserAgent配置不緩存?
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"
如何禁用此緩存,其中UserAgent
包含字符串JNLP任何要求嗎?當請求來自用戶代理JNLP(例如「User-Agent: JNLP/6.0 javaws/1.6.0_12 (b04) Java/1.6.0_12
」)時,我不希望任何Cache-Control
或HTTP響應中的其他與緩存相關的標頭。
我可以找到基於用戶代理的幾件事情的配置示例,但我不知道如何配置緩存取決於用戶代理。
感謝。這正是我所期待的。我在你的文章之前發現了它,然後看到了你的文章,向你發出了「正確答案」複選標記並刪除了我的文章。 – Eddie 2009-02-27 23:19:47