![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
In frame pdf doesn't display as it used to
Hi there.
Something changed in my Firefox recently.
I used to have all pdf options as Always Ask, which did not impact sites where the pdf is inside a frame inside the webpage.
Changing to open in firefox fixed that issue, but now it opens all pdfs in browser, which I'd rather have the option to save or open in Sumatra as I used to.
Image attached for the 3 options I've mentioned
Basically I want the option to save / open in my preferred app while not disrupting the sites that have in frame pdfs.
Thanks!
Усі відповіді (2)
Hi Joey, I haven't had time to research changes in Firefox 135 related to framed PDFs. The following change in Firefox 134 might not be relevant to the sites you use, but just in case:
It looks like Firefox 134 had a change (in a bug titled "Disallow displaying PDFs in sandboxed iframes") that forces viewing outside the frame if the frame has a sandbox attribute (MDN). A new bug (1941725) was submitted and the discussion there indicates that actually it was meant to not retrieve the PDF at all, to be consistent with Chrome's behavior.
I am not aware of a solution for you that can treat framed PDFs differently than other PDFs, but I wanted to give a little background on where we are.
inline vs. attachment disposition
If web servers don't specify how Firefox should handle a PDF, or if they specify "inline" handling, then: when Firefox is set to Open in Firefox, it loads the PDF as web content with its original URL in the address bar. The PDFs are saved with other cached web content, not in your download folder. This is usually good and works well with framed PDFs.
If web servers can try to force a download by setting Content-Disposition: attachment, Firefox changed what it does in this case:
Before Firefox 98: Firefox always showed a download dialog, even though you had already told Firefox what you wanted to do, even when you checked the box to always do this in the future. It was kind of infuriating.
Firefox 98+: Firefox downloads the file automatically and then opens it. Because these are saved to disk the URLs start with file:///. By default, they are saved in your "Save files to" folder on the Settings page, but you can use a hidden setting to switch that to the system Temp folder.
Tweaks
The developers added some preferences to address certain requests for attachment disposition PDFs:
- Use the system Temp folder instead of the Save files to folder for auto-saved-and-opened PDFs (browser.download.start_downloads_in_tmp_dir)
- Use the web content cache instead of the Save files to folder for auto-saved-and-opened PDFs (browser.download.open_pdf_attachments_inline)
- Just save the file (or show a Save As folder picker if you have Firefox set to ask you where to save) (browser.download.force_save_internally_handled_attachments)
But I am not aware of a "go back to the old way" option. Maybe someone else is aware of a setting for that.
Hi jscher2000, and thanks.
I had forgotten about that big change in 98 :)
After the 98 change the Always Ask didn't impact the in-site loading. I'm not sure if that bug report you mentioned is related; it could be.
I found a website where it is not impacted, and the pdf loads normally in frame. So indeed it could be related to how certain sites are built. I'll wait and if no other solution is posted I'll accept your answer. Thanks for the investigation!
Edit: the bug report says the file gets opened in a new tab; here I get an empty frame.
Змінено