Extra GET when loading a MIME document

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When loading an aspx page containing a MIME document, IE6 sends a second GET
request, that can be detected because the Accept-Language header is missing
or the Accept header only contains */*; I can answer with a Response.Status =
304 Not Modified and the contents sent on the first GET is displayed
correctly.
However this behaviour doesn't appear in all the clients, even on some of
them depends on the user.

On the first GET, the page is built as follows:

Response.Clear()
Response.ContentType = "application/msword"
Response.AddHeader("Content-Disposition",
"inline; filename=" & strIdDoc & ".doc")
Response.AddHeader("Content-ID", strIdDoc)
Response.AddHeader("Content-Length",
abytFile.Length.ToString)
Response.OutputStream.Write(abytFile, 0,
abytFile.Length)


Could somebody explain what causes this behaviour?. Thanks.

Alfons
 
Alfons,

I saw the same behavior with IE6 on dynamically created pages in which the
HTTP ContentType (MIME) was anything other than text/html.

Then I checked all of the HTTP Header values and found that include files
were setting the following values:

Response.ExpiresAbsolute=#Dec 1, 1999 12:00:00#
Response.Expires = -10000
Response.AddHeader "cache-control", "no-store, must-revalidate, private"
Response.AddHeader "Pragma", "no-cache"

By branching around the addition of these headers and instead setting the
following HTTP header, the problem was eliminated:

Response.CacheControl = "private"

Note: Even after calling ASP's Response.Clear, the headers are not cleared,
so you must address header values before they are set. The rest of your code
should work as-is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top