Reg Exp
Web Design
Notes Client
Profile Document Warning
If you develop Domino web sites and make use of profile documents, you may have already run into this issue. But this tip is good to revisit, and will be helpful to those who haven't used profile documents in Domino web sites yet.

The HTTP engine in Domino caches pages to speed up the serving of web pages. This includes profile documents. Profile documents are normally used to store application settings of some sort or another, like choices for a keyword field. So data in a profile document is cached by the HTTP engine.

Generally, profile documents are updated with the Notes client. So, you go into your Notes client, update some choices for your web keyword field, and then go back to your browswer and reload the page. But the old values are in there. This is because the HTTP engine doesn't know that the profile document has changed and is still using the old information. Add to this the fact that Internet Explorer (the browser of choice for most people that visit the Breaking Par web site at least) also does its own caching of information, and you can run into a "cache loop".

What you want to do is tell the HTTP engine that the profile document has been updated. This can be done through an agent that you run on the browser. The agent should get a handle to the profile document and then save it. That's all the agent needs to do. When you run the agent in the web browser, the HTTP engine is running the agent, so the HTTP engine should be able to recognize that the profile has changed and that its cache needs to be rebuilt.

(Note: although pretty reliable, this technique is not 100% reliable. The only 100% reliable solution is to restart the HTTP task, which clears its cache. This method may not be possible or reasonable all the time, however.)

Most of the time, when developing a browser application, we at Breaking Par Consulting will not use true profile documents. We will have a hidden view with documents in it. These documents are the settings documents, and we perform lookups against the settings documents. When these documents are updated in the Notes client, the HTTP task recognizes the changes and the cache is refreshed. The moral of the story is to be careful when using true profile documents in a browser application.