Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

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

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

Подробнее

How to open/download a .java file instead of it opening as a txt in a new Firefox tab?

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

more options

Hi, I need to download/open on my computer a .java file, but Firefox does not give me an "Open" or "Download" box, instead, it opens the java file as text in a new tab.

How do I download/open it on my computer?

Hi, I need to download/open on my computer a .java file, but Firefox does not give me an "Open" or "Download" box, instead, it opens the java file as text in a new tab. How do I download/open it on my computer?

Выбранное решение

I assume that you are referring to a JavaScript file. Java and JavaScript are different languages. To avoid confusion, see:

If the server sends the file as text/plain then Firefox will open the file in a tab if you left click and not offer to download/save the file. In that case you need to save the file via the right-click context menu or the File menu.

You will have to right-click the link and use "Save Link As" to save such a file directly instead of left-clicking the link.

Прочитайте этот ответ в контексте 👍 1

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

more options

Выбранное решение

I assume that you are referring to a JavaScript file. Java and JavaScript are different languages. To avoid confusion, see:

If the server sends the file as text/plain then Firefox will open the file in a tab if you left click and not offer to download/save the file. In that case you need to save the file via the right-click context menu or the File menu.

You will have to right-click the link and use "Save Link As" to save such a file directly instead of left-clicking the link.

more options

Thank you, your solution worked.

However, I did actually mean a .java file, this one actually: http://term.1.s3.amazonaws.com/Starter%20Files/T1_L29_Template.java

Is there an addon or settting that would allow it to have the open/save box by default, like in IE and Chrome?

more options

That file is send as "Content-Type: application/x-unknown-content-type" and Firefox offers to save the file for me, so in this case it shouldn't be necessary to use this workaround.

more options

That is strange. For me, Firefox opens it in a new tab like in the following screenshot, and does this on both my PCs:

more options

It is possible that this has been changed server side and that the file was previously send as text/plain and that you still have that version in the disk cache.