tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g kuczera <gkucz...@gmail.com>
Subject Re: Setting the cache control in the component
Date Thu, 07 Jul 2016 15:01:03 GMT
Hi guys,
The problem was solved by setting the headers via the instance of the
Response class (in the setupRender method), like this:

response.setHeader("Cache-Control", "no-cache,no-store,must-revalidate");
response.setHeader("Pragma", "no-cache");
response.setHeader("Expires", "-1");




2016-07-05 11:47 GMT+02:00 g kuczera <gkuczera@gmail.com>:

> PS: I don't think that this is a Tapestry related issue, but I would like
> to hear your opinion.
>
> A also tried to add the pragma value
>
>    - <meta http-equiv="pragma" content="no-cache"/>
>
> and it does not seem to change the way the website behaves (thou it
> appears in the page source).
>
> 2016-07-05 11:33 GMT+02:00 g kuczera <gkuczera@gmail.com>:
>
>> Hi guys,
>> I wonder how to prevent from returning to the previously visited page
>> (the specific one, with important content). I figured out, that there is a
>> cache-control header, which forces the web browser to load the page from
>> the server again. That would be fine, but after setting the cache-control
>> variable like this:
>>
>>    - <meta http-equiv="cache-control" content="no-cache, no-store,
>>    must-revalidate"/>
>>
>> the
>>
>>    -
>>
>>    <meta content="no-cache, no-store, must-revalidate" http-equiv="cache-control"/>
>>
>>
>> line is generated (I can see it in the page source). Besides that that it
>> is a general solution and is applied to the whole website, not only to one
>> page, I can clearly see that the website is not reloaded while I am
>> clicking on the back button. What do you think about described behaviour?
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message