View Single Post
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Mark McGinty Mark McGinty is offline
external usenet poster
 
Posts: 7
Default CSV merge data via HTTP: redundant downloads?

Greets,

I have written an app that programmatically connects a mail merge [WordXML]
document to a source of CSV data by altering the XML to specify a URL as the
data source, and adding the appropriate field definitions. (The UI won't
let you do this, even though it offers .ASP files as a possible data
source -- go figure.)

This all works nicely, but there's one little quirk: when the user opens the
document, Word downloads the data between 3 and 4 times -- I watched it
happen using WireShark, it sends the same request to the server (thus
downloads the same data) multiple times.

As a matter of course this sort of thing is set to expire immediately, but
in this case I set it to expire 5 minutes in the future, hoping to leverage
browser cache -- but no love! Apparently Word's HTTP request bypasses
cache. (I verified that the headers returned by the server permitted it to
be cached, again using WireShark; the request is definitely cachable.)

A rational reason for this behavior exceeds the limits of my imagination!
You'd think that if there was even a chance of redundant downloads, they
would at least respect the cache control headers sent by the server, but
nooooo. Cache would've made it barely noticable...

Anyways, the problem isn't a show-stopper, but the needless waste of server
resources (oh yeah, and end-users' time) is always annoying... hoping maybe
someone here has some insight.


TIA,
Mark McGinty