如何在Winforms中实现网页缓存 [英] how is webpage cache in winforms implemented

查看:65
本文介绍了如何在Winforms中实现网页缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我编写了一个可以将我访问的网站缓存在webbrowser控件中并稍后恢复的应用.

如果您使用firefox 5,请打开某些页面并关闭firefox,并使某些选项卡保持打开状态,甚至重新启动系统.再次打开Firefox,它会从缓存中加载这些页面.

如何在C#中执行此操作?

欢迎任何想法或参考

Hello,

i writing an app that can cache the website i visit in the webbrowser control and resue it later.

if you use firefox 5, open some pages and close firefox leaving some tabs open, even restart the system. openng firefox again, it loads those pages fron cache.

how can i do this in c#?

any ideas or reference are welcomed

推荐答案

我不确定是否从缓存中重新打开了网页,因为在重新启动PC并重新打开Firefox之后,页面是从Web服务器而不是从缓存中再次请求的.

但是,您可以通过保留所有访问过的页面的历史记录以及为每个条目存储一个表示当前是否打开的页面的指示符来执行类似的操作.当用户这样做时,将指示器设置为关闭,否则将那些指示器值保持打开状态,并且在您的应用程序启动时,您从历史记录中打开所有具有指示器值的页面.

祝你好运!
I''m not sure if the web pages are reopened from the cache because after restarting the pc and reopening Firefox, it looks like the pages are requested from the webserver again and not from the cache.

You can however do something similar by keeping the history of all visited pages and with every entry you store an indicator that represents the page currently opened or not. Set the indicator to closed when a user does this but otherwise leave those indicator values to opened and when your application is started you open all the pages from the history that have the indicator value opened.

Good luck!


这篇关于如何在Winforms中实现网页缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆