Yahoo! YSlow
YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. YSlow is a Firefox add-on integrated with the Firebug web development tool. YSlow grades web page based on one of three predefined ruleset or a user-defined ruleset. It offers suggestions for improving the page's performance, summarizes the page's components, displays statistics about the page, and provides tools for performance analysis, including Smush.it™ and JSLint.
Showing posts with label JSP. Show all posts
Showing posts with label JSP. Show all posts
Saturday, February 27, 2010
Friday, January 29, 2010
URL rewriting
Both of these methods revolve around the concept of URL rewriting. Basically it involves suffixing the URL with a HTTP_QUERY_STRING, which mostly is a session id used to keep track of a particular users context.
URL re-writing is used get over the usage of cookies which are dependent on browser configuration, thus not reliable at all.
The difference between the methods is in their usage and not their functionality. Both perform the same task of re-writing a URL.
encodeRedirectURL
When you send a redirect header to the browser using response.sendRedirect(string URL)
Example, you want to redirect to different page.
encodeURL
On the other hand, you provide a link to shopping cart page to a user.
Essentially they do same thing of re-writing the URl for non-cookie compliant browser.
encodeURL() is used for all URLs in a servlet's output. It helps session ids to be encoded with the URL.
encodeRedirectURL() is used with res.sendRedirect only.It is also used for encoding session ids with URL but only while redirecting.
URL re-writing is used get over the usage of cookies which are dependent on browser configuration, thus not reliable at all.
The difference between the methods is in their usage and not their functionality. Both perform the same task of re-writing a URL.
encodeRedirectURL
When you send a redirect header to the browser using response.sendRedirect(string URL)
Example, you want to redirect to different page.
if (name == null){
response.sendRedirect(response(encodeRedirectURL("errorPage.jsp"))
}
encodeURL
On the other hand, you provide a link to shopping cart page to a user.
printWriter.println("A HREF=" + response.encodeURL("shoppingCart.jasp") + ">")
Essentially they do same thing of re-writing the URl for non-cookie compliant browser.
encodeURL() is used for all URLs in a servlet's output. It helps session ids to be encoded with the URL.
encodeRedirectURL() is used with res.sendRedirect only.It is also used for encoding session ids with URL but only while redirecting.
Subscribe to:
Posts (Atom)