download part of big html


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: download part of big html

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Posts
    8

    download part of big html

    hi
    im trying to make an app to view a really big html
    what i want this app to do is -
    -get just a part of the html and display it in the app
    -then get the next part of the html but never download the whole html like resuming a download
    so the user with a modem conection can view the page without wait until the 5 mb (aproximately) to be downloaded and be abble to browse the html at wish

    here is the link:
    bigHtml

    is this can be done?

  2. #2
    Join Date
    Jan 2006
    Posts
    53
    The HTTP protocol version 1.1 supports downloading only specific portions of a file. However, the structure of HTML doesn't lend itself well to only downloading small portions at a time, and displaying those pieces seperately from the whole. Your application would have to be so HTML savvy as to watch the various HTML tags being downloaded and make an intelligent decision of where it MIGHT be OK to stop downloading and display what it has already received, and there could never be any guarentee it's downloaded enough to display properly.

    Consider a web page where its contents are almost entirely between <table></table> tags. Your application could see the opening <table> tag at the top, but then it wouldn't know where that table definition ended until it has downloaded all 5MB and found the closing </table> tag. And that's just a very simple example. The slightest usage of dynamic HTML or any scripting behavior would be next to impossible to predict or account for.

    If you knew ahead of time what the format of the file was, like just a big plain text file with not hypertext formatting, then the answer would be one of simple socket download management. After receiving the quantity you want, just close the connection. Or you can code in the HTTP syntax needed - Google can help with that.

  3. #3
    Join Date
    Jan 2006
    Posts
    8
    finally my internet is back

    Thanks Laszlo
    My solution was the same
    my code download the html until a x number of tags blocks are downloaded then the conection is closed.

    I just post this thread to see if someone could emerge with a better solution but i guess there is no way to do exactly what i want without the need of a server to cache the html file for other users to browse it.

    i did a php script to do that with a few issues to fix but i think this is out of the scope of this forum

    greetings from mexico

Similar Threads

  1. email blaster with CDONTS
    By kyle in forum ASP.NET
    Replies: 6
    Last Post: 10-31-2002, 07:12 PM
  2. vbscript regular expression match HTML Tag
    By ac7117 in forum ASP.NET
    Replies: 0
    Last Post: 01-30-2002, 04:52 PM
  3. VBScript RegExp HTML Tag
    By ac7117 in forum Web
    Replies: 0
    Last Post: 01-30-2002, 01:51 PM
  4. Delphi 6 Personal available for Download
    By Thomas J. Theobald \(Borland\) in forum .NET
    Replies: 196
    Last Post: 08-10-2001, 10:39 AM
  5. Replies: 9
    Last Post: 01-26-2001, 11:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center