The keep-across-visits Element"

From Documentation
(Created page with ' {{ZKConfigurationReferencePageHeader}} [Default: <tt>false</tt>] It specifies whether to keep the desktop when a user reloads an URL or browses away to another URL. Since br…')
 
m (correct highlight (via JWB))
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{ZKConfigurationReferencePageHeader}}
+
{{ZKConfigurationReferencePageHeader}}
  
 +
'''Syntax:'''
 +
<keep-across-visits>true|'''false'''</keep-across-visits>
  
  [Default: <tt>false</tt>]
+
  [Default: <code>false</code>]
  
 
It specifies whether to keep the desktop when a user reloads an URL or browses away to another URL. Since browsers won't cache HTML pages generated by ZK, ZK removes a desktop as soon as the user reloads the URL or browses to another URL.
 
It specifies whether to keep the desktop when a user reloads an URL or browses away to another URL. Since browsers won't cache HTML pages generated by ZK, ZK removes a desktop as soon as the user reloads the URL or browses to another URL.
  
However, you have to specify <tt>keep-across-visits</tt> with <tt>true</tt>, if you use the server-side cache for the HTML pages generated by ZK. An example of the server side cache is [http://www.opensymphony.com/oscache/wiki/CacheFilter.html  OpenSymphony CacheFilter].
+
However, you have to specify <code>keep-across-visits</code> with <code>true</code>, if you use the server-side cache for the HTML pages generated by ZK. An example of the server side cache is [http://www.opensymphony.com/oscache/wiki/CacheFilter.html  OpenSymphony CacheFilter].
  
 
<source lang="xml" >
 
<source lang="xml" >
Line 14: Line 16:
 
</source>
 
</source>
  
'''Note:''' When working with Opera, ZK always keeps the desktop (until the number of desktops exceed the allowed maximal number), since Opera is smart enough to preserve the most updated content and always reuses the cached page.
+
'''Notes:'''
  
{{ZKConfigurationReferencePageFooter}}
+
*You rarely need to turn on this option, since the HTML page will be reloaded by the browser. It is meaningless not to remove the desktop at the server, unless
 +
*#You apply a special mechanism to cache the generated HTML pages, such as OpenSymphony described above.
 +
*#You turn on the cacheable flag with [[ZUML Reference/ZUML/Processing Instructions/page|the page directive]]
 +
*Don't turn on this option, if you [[ZK Developer's Reference/Performance Tips/Reuse Desktops|reuse the desktops]] by use of <javadoc type="interface">org.zkoss.zk.ui.util.DesktopRecycle</javadoc>. After all, a desktop can be reused only if it has been removed (and turning on this option makes a desktop stays alive).
 +
*When working with Opera, ZK always keeps the desktop (until the number of desktops exceed the allowed maximal number), since Opera is smart enough to preserve the most updated content and always reuses the cached page.
 +
 
 +
=Version History=
 +
{{LastUpdated}}
 +
{| border='1px' | width="100%"
 +
! Version !! Date !! Content
 +
|-
 +
| &nbsp;
 +
| &nbsp;
 +
| &nbsp;
 +
|}
 +
{{ZKConfigurationReferencePageFooter}}

Latest revision as of 10:19, 19 January 2022


The keep-across-visits Element


Syntax:

<keep-across-visits>true|false</keep-across-visits>
[Default: false]

It specifies whether to keep the desktop when a user reloads an URL or browses away to another URL. Since browsers won't cache HTML pages generated by ZK, ZK removes a desktop as soon as the user reloads the URL or browses to another URL.

However, you have to specify keep-across-visits with true, if you use the server-side cache for the HTML pages generated by ZK. An example of the server side cache is OpenSymphony CacheFilter.

 <client-config>
     <keep-across-visits>true</keep-across-visits>
 </client-config>

Notes:

  • You rarely need to turn on this option, since the HTML page will be reloaded by the browser. It is meaningless not to remove the desktop at the server, unless
    1. You apply a special mechanism to cache the generated HTML pages, such as OpenSymphony described above.
    2. You turn on the cacheable flag with the page directive
  • Don't turn on this option, if you reuse the desktops by use of DesktopRecycle. After all, a desktop can be reused only if it has been removed (and turning on this option makes a desktop stays alive).
  • When working with Opera, ZK always keeps the desktop (until the number of desktops exceed the allowed maximal number), since Opera is smart enough to preserve the most updated content and always reuses the cached page.

Version History

Last Update : 2022/01/19


Version Date Content
     


Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.