472,328 Members | 1,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

Save a web page

I would like to save a web page to a file. When I do that, sometimes
the saved web page does not look like the original web page.
For example, when I save www.msn.com, it looks very different the
original page.
How can I save the web page to look like the original (as if I do
"File" - "Save As" and under "Save as Type" select "Web Page, complete
(*.htm,*.html)" ? Thank you.

This is how I save the web page:
Set fs = CreateObject("Scripting.FileSystemObject")
Set filePtr = fs.CreateTextFile("c:\abc.htm", True)
filePtr.WriteLine (WebBrowser1.Document.body.innerHTML)

Aug 26 '06 #1
3 3560
Jay
It doesnt work for the same reason i sent you the last post.

<fi**********@gmail.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.com...
>I would like to save a web page to a file. When I do that, sometimes
the saved web page does not look like the original web page.
For example, when I save www.msn.com, it looks very different the
original page.
How can I save the web page to look like the original (as if I do
"File" - "Save As" and under "Save as Type" select "Web Page, complete
(*.htm,*.html)" ? Thank you.

This is how I save the web page:
Set fs = CreateObject("Scripting.FileSystemObject")
Set filePtr = fs.CreateTextFile("c:\abc.htm", True)
filePtr.WriteLine (WebBrowser1.Document.body.innerHTML)

Aug 26 '06 #2

fi**********@gmail.com wrote:
I would like to save a web page to a file. When I do that, sometimes
the saved web page does not look like the original web page.
For example, when I save www.msn.com, it looks very different the
original page.
How can I save the web page to look like the original (as if I do
"File" - "Save As" and under "Save as Type" select "Web Page, complete
(*.htm,*.html)" ? Thank you.

This is how I save the web page:
Set fs = CreateObject("Scripting.FileSystemObject")
Set filePtr = fs.CreateTextFile("c:\abc.htm", True)
filePtr.WriteLine (WebBrowser1.Document.body.innerHTML)
---------------------------------------------------------------------------------------
Hi FieFie

The reason for the different look is

(to put it very briefly)
Unlike the earlier times NOW there are a lot of
web authoring technologies/languages
that incorporate javascript, asp, php, DHtml, SHtml, CSS, perl, cgi and
so on
When a web page with straight HTML is saved to the hard disc
it also collects the image files linked from that page.
But in cases where other languages and technologies are used
the save method cannot grab ALL the resources needed to
display the page in its original layout

Some web authers purposely make their Javascript, CSS or
other resources unavailable for caching/Saving.
In some cases, it is by design.

As far as I know there is no legal methods to solve this
If it is that much important and..
If the site provides open for all FTP access, you shall
manually collect the resources and reconstruct the
directory Structure. (The second IF in this para
make it almost impossible)

There are some softwares of shady origin that would
grab the Whole Portal and download it to your PC
but do not go for that kind of unethical practices

Sneha (India)
sp**********@gmail.com
----------------------------------------------------------------------------------------

Aug 26 '06 #3

<fi**********@gmail.comwrote
I would like to save a web page to a file. When I do that, sometimes
the saved web page does not look like the original web page.
For example, when I save www.msn.com, it looks very different the
original page.
How can I save the web page to look like the original (as if I do
"File" - "Save As" and under "Save as Type" select "Web Page, complete
(*.htm,*.html)" ? Thank you.

This is how I save the web page:
Set fs = CreateObject("Scripting.FileSystemObject")
Set filePtr = fs.CreateTextFile("c:\abc.htm", True)
filePtr.WriteLine (WebBrowser1.Document.body.innerHTML)
See if this example gets you a little farther along....

http://groups.google.com/group/micro...3aba0a0?hl=en&

LFS
Aug 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Martin Dale | last post by:
Dear all, Is there any way to activate the Save As command from Javascript. I would like to have a "Save as" button on a page which has been...
4
by: Nikhil Tayal | last post by:
Is there a way to write a file on the client machine from an aspx page? I've a custom query page and need to store the search criteria specified in...
12
by: Daniel Walzenbach | last post by:
Hi, I have a Website which allows users to input data. After they finished entering data they can click a button to save their input. Problem now...
2
by: fmakopo | last post by:
I am trying to save html page using C# because i want to save the page on the server not on the client side. I can do that using Javascript the...
5
by: hp_1981 | last post by:
Hi Is there anyway avoiding users to save my web pages? this idea came to my mind when I tried to save a web page, but in the middle of saving...
3
by: fiefie.niles | last post by:
I would like to save a web page to a file and have the hyperlinks work when I bring the file back up. If the web page has a hyperlink like the...
12
by: =?Utf-8?B?RnJlZU5FYXN5?= | last post by:
Hello, the scenario: There's an ASPX page which shows some text and has three buttons at the bottom: Save, Print and Close. Print and close is...
2
by: ppuniversal | last post by:
Hi All, My question is as follows: I have a text box and two links.Let the two links be - Show and Save . On clicking the Show , a web page is...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.