org.zkoss.web.servlet.http.URLEncoder

From Documentation
Revision as of 03:05, 6 December 2010 by Char (talk | contribs)


org.zkoss.web.servlet.http.URLEncoder


Property:

org.zkoss.web.servlet.http.URLEncoder
Default: javax.servlet.http.HttpServletResponse.encodeURL
[Since 5.0.0]

It specifies the class used to encode URL by including the session ID and the 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.



Last Update : 2010/12/06

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