org.zkoss.web.servlet.http.URLEncoder"
From Documentation
(Created page with ' {{ZKConfigurationReferencePageHeader}} Default: <code>javax.servlet.http.HttpServletResponse.encodeURL</code> [Since 5.0.0] It specifies the class used to encode URL by incl…') |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ZKConfigurationReferencePageHeader}} | {{ZKConfigurationReferencePageHeader}} | ||
+ | '''Property:''' | ||
+ | org.zkoss.web.servlet.http.URLEncoder | ||
+ | |||
+ | {{GlobalLibraryProperty}} | ||
Default: <code>javax.servlet.http.HttpServletResponse.encodeURL</code> | Default: <code>javax.servlet.http.HttpServletResponse.encodeURL</code> | ||
− | + | {{versionSince| 5.0.0}} | |
− | It specifies the class used to encode URL by including the session ID and | + | It specifies the class used to encode URL by including the session ID and Servlet's context path, if necessary. The specified class must implement the <javadoc type="interface">org.zkoss.web.servlet.http.Encodes.URLEncoder</javadoc> interface. |
If the clients are far away from the server, you might override this class by encoding the URL of JavaScript and CSS files with a server nearby. Thus, it could shorten the time to load a page. For more information, please refer to [[ZK_Developer's_Reference/Performance_Tips/Load_JavaScript_and_CSS_from_Server_Nearby|Performance Tips]]. | If the clients are far away from the server, you might override this class by encoding the URL of JavaScript and CSS files with a server nearby. Thus, it could shorten the time to load a page. For more information, please refer to [[ZK_Developer's_Reference/Performance_Tips/Load_JavaScript_and_CSS_from_Server_Nearby|Performance Tips]]. |
Latest revision as of 01:19, 24 February 2022
Property:
org.zkoss.web.servlet.http.URLEncoder
Applicable: globally in zk.xml via <library-property> not as <custom-attribute>
Default: javax.servlet.http.HttpServletResponse.encodeURL
Since 5.0.0
It specifies the class used to encode URL by including the session ID and Servlet's context path, if necessary. The specified class must implement the Encodes.URLEncoder interface.
If the clients are far away from the server, you might override this class by encoding the URL of JavaScript and CSS files with a server nearby. Thus, it could shorten the time to load a page. For more information, please refer to Performance Tips.
In a sophisticated environment, e.g., Reverse Proxy, the encoded URL might have to be prefixed with some special prefix. To do that, you can implement the Encodes.URLEncoder interface, and then specify the class with this library property.