Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

INET_GATEWAY Caching (OpenInsight Specific)

At 17 OCT 2001 09:30:18AM Chris Yeowell wrote:

I am using calls to INET_GATEWAY to return Linear Hash data. However, any subsequent calls with the same parameters do not reach the INET_GATEWAY. They are presumably being returned either by the client browser cache, or the web server cache. The call I am using is intended to return a current list from a table such as free appointments, which is likely to change regularly.

I have tried forcing the client browser to look for changes on every visit to a page, and I cannot find settings to disable caching on the web server.

Does anybody have experience or suggestions of how to handle this?

Regards

Chris Yeowell

AremisSoft (UK) plc


At 17 OCT 2001 09:59AM Matt Sorrell wrote:

Chris,

I can't remember the exact tag, but there is a tag you can include in the (I believe) section of your HTML page. I believe the tag is NOCACHE or something like that. It tells web servers, proxies, firewalls, etc. to not cache your web page.

It was created exactly for situations like this. This should do the trick for you.

msorrel@greyhound.com


At 17 OCT 2001 10:31AM Richard Evans wrote:

Check your browser is not set to always cache (command differs depending on browser type & version, try 'auto'). You could also try adding the following in the head tags of the web page;


At 17 OCT 2001 10:32AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Chris,

How exactly are you requesting the data from your browser? This has an impact on how the browser uses the cache.

If you just do something like a simple link or document.location.href=someURL" in script the browser will send an HTTP GET request to the server, but only if it doesn't find a matching URL in the cache first. If you use a tag and execute a 'SUBMIT' the browser sends a POST request to the server and ignores the cache. The easiest way around this is to use script that generates a random piece of data and adds it to the URL so it's always unique... eg, newURL=/INET_PROC?A=1&B=ER' + '&TIMESTAMP= + escape( new Date() ); document.location.href := newURL; This puts a timestamp on the URL and makes it unique so the browser never looks in the cache. There is also the no-cache tags that Matt mentions that should stop your browser caching the request in the first place, but thanks to the browser wars their use is not consistant. :( This works on Netscape: but it may not work on IE because of the way IE saves items to the cache, and MS also recommend you add this: or this (depending on which MSDN article you read :-) as well as the no-cache pragma meta tag. Also they recommend that you add the these meta tags in a second section *after* the section! Basically MS only really guarantee caching behaviour based on the contents of Cache-Control HTTP headers (as opposed to Meta tags) ... arrggh! (And if you've got a caching Proxy server then you HAVE to use HTTP headers because they don't read the HTML to find the META tags) Anyway that's a brief introduction to the wonderful world of caching and browsers ... check out the on-line MS Knowledge base for loads more info on IE and caching! [url=http://www.sprezzatura.com]The Sprezzatura Group

World leaders in all things RevSoft

www.sprezzatura.com_zz.jpg


At 18 OCT 2001 05:16AM Chris Yeowell wrote:

Many thanks for your suggestions on getting around caching of INET_GATEWAY data. We are using ASP pages, and so we can use your suggestion of a timestamp parameter. This seems to provide a good all round solution that doesn't depend on the browser.

Chris Yeowell


At 24 OCT 2001 05:27PM t horan wrote:

How are you using ASP and Inet at the same time? I would be interest in hearing about that. we use IIs and ASP when doing new development, but it would be nice to be able to mingle the two at times.

thanks,

tomhoran@bensoftinc.com

View this thread on the forum...