开发者

clear html webpage?

开发者 https://www.devze.com 2022-12-22 18:18 出处:网络
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).

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 o开发者_如何学Cnly 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?


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


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消