- 檔案系統模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 系統模組
- PhantomJS - 屬性
- Web 伺服器模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 雜項
- 命令列介面
- PhantomJS - 螢幕捕捉
- PhantomJS - 頁面自動化
- PhantomJS - 網路監控
- PhantomJS - 測試
- PhantomJS - REPL
- PhantomJS - 示例
- PhantomJS 有用資源
- PhantomJS - 快速指南
- PhantomJS - 有用資源
- PhantomJS - 討論
PhantomJS - offlineStorageQuota 屬性
此屬性定義了您可以在 window.localStorage 中儲存的最大資料量。該值為 5242880 位元組,即 5MB。此值可以在命令列中使用命令 --local-storage-quota = size 覆蓋,在下面介紹。
語法
其語法如下 −
var wpage = require('webpage').create();
wpage.offlineStorageQuota
示例
讓我們舉一個例子來了解如何使用此offlineStorageQuota 屬性。
var wpage = require('webpage').create();
wpage.open('https:///tasks/page1.html', function (status) {
console.log(wpage.offlineStorageQuota);
phantom.exit();
});
上述程式生成了以下輸出。
5242880
phantomjs_webpage_module_properties.htm
廣告