• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4413: TwistyPlugin needs a way to work correctly with TWikiCache

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TwistyPlugin / TWikiCache Normal Waiting for Feedback TWiki:Main.MichaelDaum n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


While I am working on the TWikiCache I just found out that the current twisties as they are produced by the TwistyPlugin & TwistyContrib, can't be cached as part of the complete html page. That's because the TwistyPlugin reads the browsers cookies and then generates specific html for it ... which is fine for the first hit on a page. But the markup produced by the plugin is then stored to the TWikiCache and reused on further calls on the same page by the same user. After loading the page, the user just changed the state of some twisties in his browser and reloads the same page again and thus gets the cached page...which has got the former classes inside the twisty controls based on the first call to that page. The TwistyPlugin will not see this second request and the changed cookies as the rendering engine is avoided on subsequent calls on the same page.

I know the TWikiCache is not coming out for TWiki-4.2, but I still would like to discuss this issue in time. Arthur, any ideas?

-- TWiki:Main/MichaelDaum - 25 Jul 2007

Is there any way javascript can find out the page is cached? Or TwistyPlugin at the time of writing the js?

-- TWiki:Main.ArthurClemens - 26 Jul 2007

Every page is cached. You can exclude sections of a page from being cached and rendered on request time. But that's not what you want for twisties, do you.

-- TWiki:Main.MichaelDaum - 27 Jul 2007

I am looking for a way to let the plugin write the initial state only when the page is not cached.

-- TWiki:Main.ArthurClemens - 27 Jul 2007

What about pages that are cached and have twisties on them? All of my pages have twisties.

-- TWiki:Main.MichaelDaum - 28 Jul 2007

The problem with VarCachePlugin appears to be missing head files Item5414.

-- TWiki:Main.ArthurClemens - 03 Mar 2008

Can't see that this is related to TWikiCache as it caches all of the page as it was send to the browser the first time.

The problem - described above - is a fundamental one: the user changes a cookie state via javascript, but gets the same page again with the old twisty states, and these don't match the cookie states anymore. That's because the TwistyPlugin does not get a chance to read them anew on perl level.

-- TWiki:Main.MichaelDaum - 04 Mar 2008

Would it be better if the cookie is optionally read with js only?

-- TWiki:Main.ArthurClemens - 04 Mar 2008

Yes, I think so. TwistyPlugin did so once, didn't it?

-- TWiki:Main.MichaelDaum - 05 Mar 2008

Yes, we added reading cookies by perl to prevent having "init" js tags right after the twisty html (to prevent visually disturbing opening/closing of twisties). Problem is that twisties are default open as no-js fallback. Perhaps we can find another mechanism for that.

-- TWiki:Main.ArthurClemens - 05 Mar 2008

Summary TwistyPlugin needs a way to work correctly with TWikiCache
ReportedBy TWiki:Main.MichaelDaum

SVN Range TWiki-4.1.2, Thu, 19 Jul 2007, build 14438
AppliesTo Extension
Component TwistyPlugin / TWikiCache
Priority Normal
CurrentState Waiting for Feedback
WaitingFor TWiki:Main.MichaelDaum

TargetRelease n/a

Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2008-03-05 - ArthurClemens
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback