I wish it worked like that, but it does not. Once you change the file
extension from
.mht to anything else, guess what it does not work. It has to have an .mht
file
extension for it to work. I tried it and was truly disappointed at the
results.
I have seen other programs save and load the entire page from a database,
but I have no clue on how they are doing it.
I don't think I suggested that you change the file extension. Perhaps I
wasn't clear enough.
You are *probably* never going to be able to render the web page
straight from the database if it is in mht format or contains images, js
files, or css files.
The rendering of html will make additional requests for images, js
files, and css files. If you don't have somewhere to fetch those that
the browser can get to, it won't work.
> I wish it worked like that, but it does not. Once you change the file
> extension from
[quoted text clipped - 9 lines]
>> So, I think you are just going to have to write to a temp file and
>> navigate to it.
CJ - 28 Feb 2008 23:42 GMT
Is there such a thing as rendering the images inline and store them into the
html file?
Something like a resource file that stores everything in gibberish, but when
you
load it, you can see the pictures etc.
>I don't think I suggested that you change the file extension. Perhaps I
>wasn't clear enough.
>
> You are *probably* never going to be able to render the web page straight
> from the database if it is in mht format or contains images, js files, or
> css files.
Mufaka - 29 Feb 2008 04:45 GMT
Not that I know of. MHT is pretty good if you can get past not wanting
to have it read from a local file.
I understand that you don't want to have to manage those files, but you
might also want to consider that you are probably going to want some
caching mechanism for these anyways depending on your database.
Also, consider that if you use Navigate, you will be able to use the
built in Back/Forward to page through previously loaded pages.
It doesn't seem too terrible to have an application folder sub-directory
to write these files from the database. When the application fetches an
mht from the database, it can create the directory if needed and write
the file there. When the application exits, it can just remove the
directory.
Another approach might be to tackle this from the MIME perspective. You
can parse these files with a MIME parser so you may be able to figure
out how email clients render emails with html bodies.
Regardless, when I come across situations like these, I typically use an
approach that I know how to get working and move on. I create an
Interface for it where I can easily swap out the behavior with another
implementation if a better solution can be found.
> Is there such a thing as rendering the images inline and store them into the
> html file?
[quoted text clipped - 9 lines]
>> from the database if it is in mht format or contains images, js files, or
>> css files.