LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to display an SHTML "page"? (https://www.linuxquestions.org/questions/linux-general-1/how-to-display-an-shtml-page-4175527975/)

DougBain 12-11-2014 06:44 AM

how to display an SHTML "page"?
 
I did a File=>Save Page while looking at a website in firefox.

This gave me an SHTML file and a folder, both carrying the "page" name.

I assumed I'd be able to re-display the web page by just doing File=>Open File on the shtml file in firefox but it doesn't work - I keep getting "What should firefox do with this file?"

How do I get the page to re-display?

Doc CPU 12-11-2014 08:58 AM

Hi there,

Quote:

Originally Posted by DougBain (Post 5282962)
I did a File=>Save Page while looking at a website in firefox.

This gave me an SHTML file and a folder, both carrying the "page" name.

I assumed I'd be able to re-display the web page by just doing File=>Open File on the shtml file in firefox but it doesn't work - I keep getting "What should firefox do with this file?"

How do I get the page to re-display?

I guess the easiest way is to rename the file from *.shtml to plain *.html. The additional 's' in *.shtml is only an indicator for the server that this document is supposed to use SSI (server side includes). Once the document is transferred to the client, there is no special meaning of this any more.

When your browser gets the document from the web server, they "talk" HTTP among each other, and part of this protocol is the so-called Content-Type header. This header tells the browser the MIME type of a resource, which in this case would be "text/html".

But when you open a saved document from your local file system, there is no HTTP, and your browser has to guess the MIME type from the file extension. Obviously, *.shtml isn't recognized by Firefox, so just rename it.

[X] Doc CPU

DougBain 12-11-2014 12:12 PM

Solved
 
Many thanks. As I thought, it was something simple I was missing


All times are GMT -5. The time now is 04:58 AM.