Re: Looks like redirect creates a new session

Stephan Eggermont <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
On 18-11-15 20:03, [email protected] wrote:
> I looked at task and thought that it would only get me part of the way.
>
> Question: What happens if the user is sitting on a page for a long time and
> the session expires?

We try to avoid that. If you can afford to have long sessions:

QCComponent>>renderKeepAliveOn: canvas
	| cacheTimeout |
	cacheTimeout := self session application cache expiryPolicy 
configuration at: #cacheTimeout.
	canvas document addLoadScript:
		(canvas jQuery ajax
			callback: [];
			interval: (cacheTimeout - 60) seconds)

And then in the application

QCApplication>>renderContentOn: canvas
	self hasKeepAlive
		ifTrue: [ self renderKeepAliveOn: canvas ].
	self renderHeaderOn: canvas.
	super renderContentOn: canvas

Stephan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.