cannot open local shtml file
I am trying to open a local shtml file (any file) but I get prompted: You have chosen to open (filename) which is a Hyper Text Markup Language from: Local file location. What should Firefox do with this file? Open with (browse), Save File, Do this automatically for files like this from now on. Before I upgraded my FF browser, I did not have this issue. What steps should I take to resolve it?
Alle svar (7)
I have the same problem, and it's getting worse. I have a web site that uses .shtml files, and I want to be able to update the content locally before exporting it to the server. That means I want to be able to render it as html, and the SSIs will simply be ignored as comments.
Until recently I could do this on linux by creating a symlink with a .html extension that pointed to the .shtml file. That was sort of awkward and silly, but FF 13 seems to resolve the symlink to the original filename, so all it will do is save it. The only workaround I can find is to make a hard link with a .html extension.
More generally, it would be nice to have an option to force firefox to render content as HTML or plain text even if it doesn't think it's possible. The situation comes up relatively frequently with source code that firefox will only open in an external editor and not display as plain text in the brower.
Ændret af benedictbrown den
Try Open in Browser: https://addons.mozilla.org/firefox/addon/open-in-browser/
This looks like a fantastic add-on and a very helpful suggestion, but it turns out not to work for open local .shtml files because it is limited to the http protocol. For pages open with any other protocl, including file///, it can only display them as source. It will be very handy for viewing source code though.
(I could run a web server that only accepted connections from localhost and let me access my entire home directory, but that's even less elegant than hard links.)
If I drag and drop a .shtml file onto an open tab, it renders normally. In your case, is Firefox displaying an Open/Save/Cancel dialog? You could try blowing away your "download settings" and having Firefox revert to factory defaults. See: https://support.mozilla.org/en-US/kb/cant-download-or-save-files#w_reset-download-actions-for-all-file-types
This can also happen if you have other software set to handle such a file (i.e. link a MIME type to the file extension) and that will override the Firefox default behavior.
Deleting mimeTypes.rdf didn't do the trick. Firefox displays is standard dialog for downloaded files. I have the option of optening the file in firefox, which creates a new, blank tab, and displays the dialog again, of viewing as page source (because of the open-in-browser extension), or of saving to disk. I get the same thing if I drag and drop the file onto firefox.
The shtml extension is associated with text/html and nothing else in /etc/mime.types, and I don't seem to have any local overrides in my home directory (that was the very first thing I checked). Presumably firefox offers to open the file in firefox precisely because it is associated with text/html, but then checks the file extension sometime after that and changes its mind. Sort of silly when you think about it.
Possibly related (unsolved) thread: How to prevent version 13.0 from following symlinks.