[ 
https://issues.apache.org/jira/browse/KNOX-3054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tamás Hanicz updated KNOX-3054:
-------------------------------
    Description: 
Firefox ignores caching headers as meta elements.
{code:java}
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0"> {code}
Due to this Firefox loads index.html from cache and the user won't be 
redirected to the Knox login page when there is no Cookie present and the user 
can't use the homepage.

The solution is to add the below caching headers to the 
_/gateway/homepage/home/_ endpoint. It serves the index.html to the user.
{code:java}
httpResponse.addHeader("Cache-Control", "no-cache, no-store, must-revalidate");
httpResponse.addHeader("Pragma", "no-cache");
httpResponse.addHeader("Expires", "0"); {code}
 

  was:
Firefox ignores caching headers as meta elements.
{code:java}
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0"> {code}
Due to this Firefox loads index.html from cache and the user won't be 
redirected to the Knox login page when there is no Cookie present and the user 
can't use the homepage.

The solution is to add the below caching headers to the 
_/gateway/homepage/home/_ endpoint. It serves the index.html to the user. This 
solution has to be patched.
{code:java}
httpResponse.addHeader("Cache-Control", "no-cache, no-store, must-revalidate");
httpResponse.addHeader("Pragma", "no-cache");
httpResponse.addHeader("Expires", "0"); {code}
 


> Replace ignored meta tag cache headers to HTTP headers
> ------------------------------------------------------
>
>                 Key: KNOX-3054
>                 URL: https://issues.apache.org/jira/browse/KNOX-3054
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Homepage
>    Affects Versions: 2.1.0
>            Reporter: Tamás Hanicz
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Firefox ignores caching headers as meta elements.
> {code:java}
> <meta http-equiv="Cache-Control" content="no-cache, no-store, 
> must-revalidate">
> <meta http-equiv="Pragma" content="no-cache">
> <meta http-equiv="Expires" content="0"> {code}
> Due to this Firefox loads index.html from cache and the user won't be 
> redirected to the Knox login page when there is no Cookie present and the 
> user can't use the homepage.
> The solution is to add the below caching headers to the 
> _/gateway/homepage/home/_ endpoint. It serves the index.html to the user.
> {code:java}
> httpResponse.addHeader("Cache-Control", "no-cache, no-store, 
> must-revalidate");
> httpResponse.addHeader("Pragma", "no-cache");
> httpResponse.addHeader("Expires", "0"); {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to