[Seaside] Re-render component on back button
arning315 at comcast.net
Mon Dec 2 13:47:41 UTC 2013
I did a little poking around with WACounter (early seaside version 3) and..
When hitting the back button(Chrome), the screen updates correctly, but
does not re-render, suggesting caching. So I requested no-caching:
*self requestContext response doNotCache.**
** html heading: Time now asString.*
html heading: count.
callback: [ self increase ];
callback: [ self decrease ];
And still no re-render. Google found this:
"Configure the receiver to not be cached at all."
self headerAt: 'Pragma' put: 'no-cache'. "Proxies"
self headerAt: 'Expires' putDate: self doNotCacheExpiryDate. "HTTP 1.0"
self headerAt: *'Cache-Control' put: 'no-cache, max-age=0,
must-revalidate, no-store'*. "HTTP 1.1"
and now it re-renders on a back button. HTH
On 12/1/13 10:34 AM, Lorenz Köhl wrote:
> I'm developing a shopping cart and wondering if there's any way to show its size consistently even after pressing the back button.
> I think I would need to force a re-render, but since I'm not sure what the browsers actually request on back button presses I'm at a loss how to configure this, if possible.
> When I open the developer tools network tab in chrome and press the back button, the behaviour is different than normally, ie. after I added an item and it shows '1 article' and I press back, then the component is properly re-rendered and still shows '1 article' even on the previous page. So chrome requests are probably
> Is it possible to force this behaviour in the normal browser state?
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside