Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox-esr 68.7.0 local opened .shtml causes repeated tab opens of blank page.

more options

Using firefox-esr 68.7.0 on Raspberry PI4, Linux 10 (buster). Firefox handles the online .shtml webpages properly at: http://www.buczynski.com. All webpage files were downloaded to RPi using FileZilla. Used File=>Open File to open the local index.shtml file. This results in repeated new tabs opening. Using upper right X to close firefox results in the application relaunching and attempting recovery repeating the same problem. RPi reboot is the only way to recover from the problem.

There are a number of other .shtml files and they all experience the same behavior when opened locally. If a .shtml file is copied to have a .html extension, the locally opened file displays properly.

Problem does not occur on Windows 7 box, Firefox 75.0 (64 bit) when the index.shtml file is opened locally.

Using firefox-esr 68.7.0 on Raspberry PI4, Linux 10 (buster). Firefox handles the online .shtml webpages properly at: http://www.buczynski.com. All webpage files were downloaded to RPi using FileZilla. Used File=>Open File to open the local index.shtml file. This results in repeated new tabs opening. Using upper right X to close firefox results in the application relaunching and attempting recovery repeating the same problem. RPi reboot is the only way to recover from the problem. There are a number of other .shtml files and they all experience the same behavior when opened locally. If a .shtml file is copied to have a .html extension, the locally opened file displays properly. Problem does not occur on Windows 7 box, Firefox 75.0 (64 bit) when the index.shtml file is opened locally.

All Replies (8)

more options

Sounds that you have created an automatic download action for the .shtml file extension. You can check the handlers.json file in the profile folder.

See also:

more options

Configured to have Firefox prompt when opening the .shtml file. See config and handlers.json attachments. Opened the index.shtml file and captured 3 iterations of the problem. When OK was selected, another tab was opened and prompt presented. Attachment shows the page opened from webserver. The issue only occurs when the .shtml file is locally opened.

more options

Locally opened using Chromium.

more options

If you get a prompt to select an application when you open a file with Firefox then this means that Firefox doesn't support this file type (extension) and you shouldn't open this file using Firefox because that will repeat the open dialog.

I can open a .shtml file without problems in Firefox. Try to remove that .shtml section from handlers.json as you may have associated this file extension with an unsupported MIME type.

more options

Tried with the .shtml removed; repeating prompt still occurs. Snapshot of handlers.json files used are attached. The /etc/mime.types file defines shtml as text/html. Found definitions for application/x-extension-shtml in /home/pi/.local/share/mime/application and /home/pi/.local/share/mime/packages.

I understand that Firefox would prompt for an action when encountering an unknown file type. With the .shtml definition present in handlers.json, Firefox knows how to handle it. The .shtml definition in handlers.json is likely not the root cause of the repetitive behavior. Firefox does not properly process the .shtml mime type when locally opened on my system.

Since opening a .shtml file works with your Firefox, can you provide some details about the Firefox version and system environment?

more options

Hi Don, where do you think Firefox learns the MIME-type of a file opened from the file system (not from a web server, which sends the Content-Type header)? If it is from one of the *-extension-shtml.xml files, try changing the content type to text/html and see whether Firefox likes it better.

more options

~/.config/mimeapps.list is the only place I'm aware of for making your suggested change. You'll need to be more specific if additional changes are required elsewhere.

The problem can be worked around by editing the ~/.config/mimeapps.list file; see attachment. In addition to the added lines, existing lines for x-extension-shtml must be comment out. (adverse effects?) No changes to the handlers.json file are needed.

more options

Don said

~/.config/mimeapps.list is the only place I'm aware of for making your suggested change. You'll need to be more specific if additional changes are required elsewhere.

I was looking at your previous screenshots. The user-extension-shtml.xml file seemed to be where you would tell the system that the preferred MIME type of

whatever.shtml

is

text/shtml

instead of

application/x-extension-shtml

But I'm a Windows person so there are many things I don't know about Linux.

The problem can be worked around by editing the ~/.config/mimeapps.list file; see attachment. In addition to the added lines, existing lines for x-extension-shtml must be comment out. (adverse effects?)

Sounds good.