logo

Browser Not Caching IQY Excel Web Queries

As a follow-up to recent postings about using Excel Web Query files (*.iqy) with Domino, here's the description of another problem I came across along with a solution.

It wasn't the problem Kathy was asking me about but it was a problem nonetheless. When I clicked the IQY link I saw this error:



The requested site is unavailable or cannot be found. Please try again later.

After trying lots of the obvious things I turned, once again, to HTTPWatch. After a bit of, ahem, sniffing about I noticed the problem. Compare these headers:

With those from a working .IQY form:

Notice the problematic IQY file doesn't cache. So IE downloads this executable "file", which is in fact a page of text, but doesn't store it on the hard drive. IE then tries to launch it, but can't as it doesn't exist on disk. Or at least that's my understanding of the problem. As a solution I added the following to the form's WebQueryOpen event:

I've no idea what significance the "private" bit has, but it's a legal value and seems to cause cacheing, which fixes the problem.

But why the different cache settings in the first place? Well, Kathy's form had some computed fields and @functions on it. My didn't. Nothing special at least. To be honest I can't work out exactly what Domino is doing. To cache or not to cache, that's Domino seemingly random decision. To add to the problem, an element of this behaviour is due to differing server versions. It's also down to Domino to decide whether to accept our new cache-control setting. I saw these headers on one server:

What am I getting at with all this? I'm not sure. Hopefully you've learnt something though. Whether it's how useful HTTP sniffing can be or that you can set headers when opening a form. Either way, it's been an interesting exercise for me. It's made me wary of using IQY files. Although I still think it's a handy little tool to have there's this quagmire of problems to navigate.

Another project I'm working on requires some cache magic and so it's high on my list of things to read up on. There might be more cache talk some time soon.

Comments

    • avatar
    • Yuval
    • Tue 1 Feb 2005 04:30

    Good site about caching:

    {Link}

    • avatar
    • Jake
    • Tue 1 Feb 2005 07:23

    Thanks Juval. I just did a search on "domino caching" and there's not that much out there. Might be room for me to squeeze an article in there...

  1. Hey, Jake - your link to HTTPWatch throws a 404...

    • avatar
    • Jake
    • Tue 1 Feb 2005 10:38

    Oh no it doesn't ;-)

  2. I realy like this site... I am new to Domino CLP6 and realy struggle with building a certain website... Wonder if you can have an article about this proble....

    I want to create a form were webusers will enter their name and contact detail... Then they need to upload 4 pictures ... After upload it must display on the same form. From here I want to build a search thru all these forms... MY PROBLEM IS THE UPLOADING IF THE IMAGES!!!!

    I only want to upload certain type of images, restrict the size and then display on the form....

    HELP PLEASE!!!!!!!!!!!!!!!

    • avatar
    • Marleen
    • Fri 4 Feb 2005 10:02

    Your cache-problem reminds me of a similar problem I had a few months ago. It involved displaying PDF files over a secure connection (HTTPS). In HTTPS mode, the server automatically sent a "no-cache" header. IE has a bug in this case: it downloads the file and deletes it before it displays it (the same bug you found). Other browsers handle this correctly. Workaround in IE is to right-click the link and save the file yourself.

    It took us a while to find this, on the test server (not using HTTPS) it worked...

    • avatar
    • Steve Mo
    • Thu 21 Jun 2007 12:45 AM

    This fix does not work on version 6.5.4 but a fix that does work is adding a 'text' field, computed for display - default vaule:

    @SetHTTPHeader(Cache-control";"private") This will work...

  3. Thanks! I just ran into this issue and putting the SetHTTPHeader in the WebQueryOpen worked for me. Adding a computed text field caused an error saying that the file was no good.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Tue 1 Feb 2005

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content