dominoExperts.com - Powered by Domino 8.5.2 Domino Accelerator Pack
- Reduce network traffic
Lotus Triple Search DominoExperts + Blogs + R8 forum
dominoExperts.com -> General Domino Talk -> Weekly Web Performance Tip

 When to use the private cache header


Tomas NielsenPost date: 2010-10-30 18:59

When setting up caching for your web applications there is a feature you can make use of that will cache the content on a per user basis.

The Cache-Control directive have an extra parameter "private" that you can set to make sure no proxies will cache the page and deliver it to someone else.

If your Domino server is on the Internet you MUST take this into consideration if you are in a corporate LAN you might already have proxies in house or you might get it in the future. In any case you should know about this.

As an example I have had one customer that introduced proxy servers into their LAN (without telling the web developers) and suddenly there was a complaint from one country that the local intranet start page had not changed for three weeks. The proxy had picked up an malformed cache header and somehow decided it could cache it forever. The page was super fast, just not very current.

The same can happen if you are on the Internet. You, as a web developer, have no knowledge of what is between you and your users. Local ISP's can have proxies set up to save bandwidth. Also about 20% of the internet traffic goes through Akamai caching proxies. You need to think about this.

Say you have a page in you web application where you can look at the latest issues in a work flow. If the URL is identical for all users and you decide to cache the page without the private parameter any proxy in between will think it is fair game to cache the page for everyone. If you add the private parameter like:

@SetHTTPHeader("Cache-control";"max-age=600,private");

Any proxy, including Domino Accelerator Pack, will detect it as content not appropriately for caching.

The content will still cache locally in the browser but you are sure no proxies in between will.

So if you have a local proxy or you are on the Internet and IF you have content that is unique for a single user you should set the Cache-control: private header.

Using the private header you can still cache content for that user but make sure no one else gets the same content.




RSS feed
Subscribe to Forum

Share this page

Top posters
Tomas Nielsen212
Joacim Boive27
Fredrik Stöckel27
Danne14
Niklas Waller13
Kenneth Haggman11
Bryan Kuhn10
Daniel Lehtihet9
Jonas Israelsson8
dm997