Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

Firefox prompts me to download files instead of opening them...

  • 1 ответ
  • 1 имеет эту проблему
  • 3 просмотра
  • Последний ответ от cor-el

more options

This happens to me and many other people all the time. It always happens with .swf files since I can remember, for security reasons. But it also very often started happening with .pdf files and other file types. Now it happens with .txt files and it's the straw that breaks the camel's back. Inconsistently so as well since when I open it from the website it prompts to download and not when I open the file locally.

This is such a problem that this add-on had to be made https://addons.mozilla.org/en-US/firefox/addon/open-in-browser/?utm_content=addons-manager-reviews-link&utm_medium=firefox-browser&utm_source=firefox-browser And as you can see it is rather popular. Shouldn't Firefox solve this bug (no it's not a feature or quirk) once and for all?

How can I do the same without an add-on?

This happens to me and many other people all the time. It always happens with .swf files since I can remember, for security reasons. But it also very often started happening with .pdf files and other file types. Now it happens with .txt files and it's the straw that breaks the camel's back. Inconsistently so as well since when I open it from the website it prompts to download and not when I open the file locally. This is such a problem that this add-on had to be made https://addons.mozilla.org/en-US/firefox/addon/open-in-browser/?utm_content=addons-manager-reviews-link&utm_medium=firefox-browser&utm_source=firefox-browser And as you can see it is rather popular. Shouldn't Firefox solve this bug (no it's not a feature or quirk) once and for all? How can I do the same without an add-on?
Приложенные скриншоты

Все ответы (1)

more options

You always get the download dialog when the server sends a file with a generic content type like "application/octet-stream" or "content-disposition:attachment". You should be able to see this in the Web Console or Network Monitor. If a text file is send as text/plain or text/unicode then Firefox should open the file in a tab. The same for PDF files that are send as "application/pdf". Current Firefox releases have the feature to open PDF files in a tab even if they are send with a generic content type (Open in Firefox).

This file is send as content-disposition: attachment; filename="words.txt" and thus will give you a download dialog.

You can look at this extension.