Generating PDF, error with IE and HTTPS

前端 未结 12 559
醉酒成梦
醉酒成梦 2020-12-08 09:17

I am streaming a PDF to the browser in ASP.NET 2.0. This works in all browsers over HTTP and all browsers except IE over HTTPS. As far as I know, this used to work (o

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 09:33

    I found that this seemed to work for me:

    Dim browser As System.Web.HttpBrowserCapabilities = Request.Browser
    If (browser.Browser = "IE") Then
      Response.AppendHeader("cache-control", "private") ' ie only
    Else
      Response.AppendHeader("cache-control", "no-cache") ' all others (FF/Chrome tested)
    End If
    

提交回复
热议问题