File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes splitting html file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "splitting html file" Watch "splitting html file" New topic
Author

splitting html file

Taggu Gupta
Greenhorn

Joined: Jul 13, 2010
Posts: 12
In our application we load html files. But, sometime because of the size of the html file the loading takes a lot of time and there is user frustration because of this. Can we break the huge html file into parts and then load it part by part. What is the best way of doing this.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
Why are the files so large? There's a limit to what humans can process in one go. Why not serve smaller pages containing less information, and then add a pagination feature so that users can navigate between pages?


Ping & DNS - my free Android networking tools app
Taggu Gupta
Greenhorn

Joined: Jul 13, 2010
Posts: 12
In our application we convert word,excel,pdf, etc documents to html files for viewing in the browser. For e.g if the excel file is huge then it is converted to a huge html file. This how we get a huge html file. My question what technology/technique can I use to split this large html file into smaller blocks and then load it as a page.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
That's what pagination is: to break a document into smaller pieces (for example pages of a document, that's where the word originates), and serve those individually. Word and PDF in particular have a natural "page", for spreadsheets it depends on its internal structure.
Taggu Gupta
Greenhorn

Joined: Jul 13, 2010
Posts: 12
Thanks for helping. But, how do i actually split this html file and then page it . Can you provide a small code so I can understand it much better or maybe point me to some place which has this.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
How are you converting documents to HTML pages? Some library? That's where you would split it into pieces.
Taggu Gupta
Greenhorn

Joined: Jul 13, 2010
Posts: 12
Yes, I'm using a third party library which converts this into an html file. So, I can only do post-processing on the already generated html file. But, how do i split and then re-assemble this as a page in the client code. Some pointers would be useful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: splitting html file