Hi All,
We have a Web Application which has some reports. Those reports are opened in a new tab by posting a request to server side which in response sends the following headers so that browsers can open the PDF content in browser's PDF Viewer.
Access-Control-Allow-Methods | GET, HEAD, POST, OPTIONS |
Access-Control-Allow-Credentials | true |
Content-Disposition | inline; filename="UL-Info.pdf" |
Connection | close |
Content-Type | application/pdf |
Cache-Control | max-age=0, no-cache, no-store, must-revalidate |
Transfer-Encoding | chunked |
This was working fine in Chrome and FireFox but in Edge, it downloads the PDF and then when you click Open, it opens in the new tab in its built-in PDF Viewer. The intention is not to download it first but to open it straight in the PDF Viewer that is what is happening in other browsers. Also, if I install Adobe Reader, although it downloads the file first, but it opens it straight away, in a new Application Window, once the file is fully downloaded.
So, I wanted to ask if there is something missing in my response header that is needed for the new PDF Viewer in Edge to open PDF content in the new browser or is it a bug which will be fixed in later release?
Windows 10 Build: 10162.
Thanks,
Shoaib