Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在Ionic 4/5中缓存外部URL网页?_Html_Ionic Framework_Url_Caching_Inappbrowser - Fatal编程技术网

Html 如何在Ionic 4/5中缓存外部URL网页?

Html 如何在Ionic 4/5中缓存外部URL网页?,html,ionic-framework,url,caching,inappbrowser,Html,Ionic Framework,Url,Caching,Inappbrowser,我想要实现的是在线和离线互联网连接之间的功能 当用户单击“我的”按钮并加载网页时,当连接到Internet时,我想使用Ionic中的应用程序内浏览器模块加载url,加载后,我想缓存该网页,以便用户下次尝试访问该网页时,即使没有Internet,也可以使用InApp浏览器查看整个网页 HTML代码: <ion-button (click)="loadPage()">Load Page</ion-button> loadPage(){ const

我想要实现的是在线和离线互联网连接之间的功能

当用户单击“我的”按钮并加载网页时,当连接到Internet时,我想使用Ionic中的应用程序内浏览器模块加载url,加载后,我想缓存该网页,以便用户下次尝试访问该网页时,即使没有Internet,也可以使用InApp浏览器查看整个网页

HTML代码:

<ion-button (click)="loadPage()">Load Page</ion-button>
loadPage(){
    const browser = this.iab.create('https://ionicframework.com/');

    browser.on('loadstop').subscribe(event => {
      // Perform Caching Over Here
    });