Open PDF in browser or Preview instead of downloading

Solution 1:

It is the web site that instructs the browser to download the PDF instead of viewing it:

Web sites usually controls this using the "Content-Disposition: attachment" header which is sent by the web server to the browser.

The web site probably changed from not sending this header to now sending the header, and so Safari will start a download instead of viewing the document.

In this case, I would suggest sending a feature request to the web site owner to let you have both a view and a download button for these PDFs.

Web sites also have the option of controlling this directly from HTML, although it is not as commonly used as the HTTP header. They do this by including am "download" attribute on the link itself (the "a" tag).

If that is the case, you could open the Developer Tools in Safari to manually edit the link and remove the download attribute before clicking. It is going to be quite tedious though.