Saturday, November 15, 2008

WebSphere Portal V4.x, 5.x, 6.x Home Page Design Flow!

Recently I noticed a design flow in WebSphere Portal that may leads to performance issue for portal pages. At first glance it looks harmless but when looked closely it revealed as a trojen horse. Ok no more suspense here it is.

I am talking about the default home page design of WebSphere Portal V5.1. You may have noticed that if you type a URL that does not existin portal, then by default it will go the home page. e.g. suppose that http://yourportalserver/wps/portal/test is not a valid URL then it will always go the home page. This look like a reasonable design but there is a pitfall with this design.

Suppose that you have a portal page that contains broken links to images, css, javascript or any other files. Now guess what happens.The browser will try to download the broken links, but the portal server will keep on processing the home page and send to the browser. confused? ok suppose you have a broken link in your portal page say styles.css. Now your browser try to download something like https://yourserver/wps/myportal/kcxml/04_...!!/delta/base64xml/Styles.css (The URL pattern may change in your server) since this URL does not exist, the portal will process home page and send the content to the browser!. So in effect the home page and all portlets in home page will be unnecessarily executed and this will affect the performance of the page and portal server.

Summary:
1) Leaving a broken link in portal page is a mistake from the developer! but processing and sending the home page for styles and images are a design flow from portal side.
2) Do not leave broken links in portal page.
3) Move all the static files to a web server rather from portlets, themes and skins.

No comments: