ajsie
ajsie

Reputation: 79776

clear html webpage?

i am currently developing a crawler that crawls all links on the web and displays them in the web browser (and saving it of course).

but after some hours there will be a huge list displayed on the web browser and i want to only display lets say 1000 links at the same time. then i clear the html and display another 1000 links. this is also good for the RAM or it will eat up all memory.

how do i clear the web browser screen?

EDIT: i have seen some scripts using some flush buffer functions. has this anything to do with my case?

Upvotes: 0

Views: 6079

Answers (3)

Li0liQ
Li0liQ

Reputation: 11264

You can use document.write('') to completely delete the contents of the web page without reloading it.

Upvotes: 2

Hooray Im Helping
Hooray Im Helping

Reputation: 5264

Pagination: What is it and how to do it? Sounds like you're describing a perfect opportunity to paginate your results.

Upvotes: 3

Pekka
Pekka

Reputation: 449613

If you want to clear the screen in a way that saves memory on the client's side, you'll have no choice but to do redirect to a different page, e.g. using JavaScript: location.href="...". That will trigger the loading of a completely new page though, so you would have to save your crawler's state and continue from the saved point.

Upvotes: 1

Related Questions