tags:

views:

59

answers:

3

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?

+1  A: 

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.

Pekka
+3  A: 

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

Hooray Im Helping
+1  A: 

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

Li0liQ
I would test whether this actually clears the page from the browser's memory. It could be that it doesn't.
Pekka