访问Google Chrome的缓存 [英] Access Google Chrome's cache

查看:124
本文介绍了访问Google Chrome的缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从扩展程序中访问Google Chrome的缓存?



我想编写一个扩展程序,用于在联机时加载页面的缓存版本一个不能被访问(例如互联网连接问题)。



更新:我知道我可以写一个NPAPI插件,做到这一点,但我宁愿不要写一个...我没有诉诸NPAPI解决方案。



注意:据我所知,Google Chrome不支持此功能(至少不是开箱即用):我刚刚有一集无法访问互联网,因此我被搁浅了...

解决方案

不幸的是,我99%确定在扩展中不使用NPAPI是不可能的。 p>

Chrome扩展程序已被沙盒化到自己的进程中,并且只能访问扩展程序文件夹中的文件。



有是对 chrome:// favicon / 之类的东西的支持。但至少在现在,这就是它。



来源(Google Chrome浏览器扩展参考)


Is it possible to access Google Chrome's cache from within an extension?

I'd like to write an extension that loads a cached version of a page when the online one can't be accessed (e.g. Internet connectivity issue).

Updated: I know I could write an NPAPI plugin accessible through an extension to accomplish this but I'd rather not suffer writing one... I am after a solution without resorting to NPAPI, please.

Note: as far as I can tell, Google Chrome doesn't support this functionality (at least not out-of-the-box): I just had an episode of "no Internet access" and I was stranded...

解决方案

Unfortunately, I'm 99% sure that this is impossible without using an NPAPI in your extension.

Chrome extensions are sandboxed to their own process, and can only access files within the extension's folder.

There is some support for things like chrome://favicon/. But that's about it, at least for now.

Source (Google Chrome Extensions Reference)

这篇关于访问Google Chrome的缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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