Is it possible to save a complete html page to a table?

  • I'd like to be able to save a web page to a table and then be able to display it again by clicking on a hyper link, is this possible and is there any tutorial's on the subject?

  • im not expert, but im sure you'd be able to do it using a programming language such as vb.net, asp.net, classic asp or something similar.. i would imagine you'd have to read the source html and save it into a binary column.. then using asp or asp.net or php or whatever you'd like, you'd have to read the data from the database back out and print it to the screen..

    you'd have a lot more work with the pictures though..

    personally what I'd do is just save the website to a folder, and save the path of the folder in the database.. that way you dont have to store it in the database, you dont have the issues viewing the images, and you save yourself a bunch of coding putting and getting the data

    im sure someone else can bring up a better solution however

    --------------------------

    I long for a job where my databases dont have any pesky users accessing them 🙂

  • [font="Verdana"]

    mick burden (4/28/2008)


    I'd like to be able to save a web page to a table and then be able to display it again by clicking on a hyper link, is this possible and is there any tutorial's on the subject?

    I would suggest to store the URL instead. whenever you wants to call the same page again, just fetch the URL, stored into table, and pass it dynamically to the application. And as it is a .html page, it will not take much time to load. think about it.

    Mahesh

    [/font]

    MH-09-AM-8694

  • Mahesh, I'm sure you are correct, but I would also like to able to store the html as well

  • Mahesh Bote (4/29/2008)


    [font="Verdana"]

    mick burden (4/28/2008)


    I'd like to be able to save a web page to a table and then be able to display it again by clicking on a hyper link, is this possible and is there any tutorial's on the subject?

    I would suggest to store the URL instead. whenever you wants to call the same page again, just fetch the URL, stored into table, and pass it dynamically to the application. And as it is a .html page, it will not take much time to load. think about it.

    Mahesh

    [/font]

    Mahesh, I see your point, but on the other hand, I guess this really depends on what the OP needs it for. Websites can change on a day by day basis - if the OP wants to store what was there at the time, then just passing the URL wont do much good. As for the loading time, loading a page from a remote host will almost certainly take longer than running from local. And it being html will be the same no matter where its run from, its still got to be parsed by the browser.

    The only real positive I can see from your idea would be the space saved.

    --------------------------

    I long for a job where my databases dont have any pesky users accessing them 🙂

  • mick burden (4/29/2008)


    Mahesh, I'm sure you are correct, but I would also like to able to store the html as well

    Save it as a BLOB / Binary data type, or save it as NVARCHAR(max) and put everything that is not HTML text (images etc) in a directory that it can access.

  • Thanks Steve, does that include tables etc?

  • [font="Verdana"]

    mick burden (4/29/2008)


    Mahesh, I'm sure you are correct, but I would also like to able to store the html as well

    Just curiosity, what kind of application you are developing?

    Mahesh[/font]

    MH-09-AM-8694

  • mick burden (4/29/2008)


    Thanks Steve, does that include tables etc?

    tables are just html.. so yes, the tables etc should also be copied.. just any associated images etc wont be would be the thought

    --------------------------

    I long for a job where my databases dont have any pesky users accessing them 🙂

  • Mahesh, it's just a little project for me, so I can cut and paste a web page, store it in the database and then displaying it on my own personal "intranet" at home without having to build new pages

  • The biggest challenge will be with the images - they are usually stored in sub-folders on the web server. In some cases they are hosted on another domain like akamai.

    If you save just the html then IE will reach out to the Internet to retrieve them, but if the image URL has changed you'll get little boxes with a red X.

    My suggestion is to create a local folder "web pages" or whatever, and (if using IE6) then click

    File ~ Save As ~ Web Page, complete (*.htm, *html)

    and IE will save the html page using the TITLE tag from the page, and also create a "_files" subfolder that holds all of the images.

    Then, you can simply browse your local "web pages" folder and view the page as it was when it was saved.

  • Thanks William, I'll give that a try

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply