quota exceeded中文翻譯,quota exceeded是什么意思,quota exceeded發(fā)音、用法及例句
- 內容導航:
- 1、quota exceeded
- 2、localstorage的使用(緩存)
1、quota exceeded
quota exceeded發(fā)音
英: 美:
quota exceeded中文意思翻譯
常用釋義:超出配額:指超過(guò)規定的限額或分配的數量。
超出配額
quota exceeded雙語(yǔ)使用場(chǎng)景
1、Error 01372: User's Disk Quota Exceeded.───錯誤編碼01372:用戶(hù)額定儲存空間已滿(mǎn)。
2、If a factory exceeded its quota, it could sell the surplus at a higher price.───若生產(chǎn)量超出配額,工廠(chǎng)可以高價(jià)賣(mài)出這些剩余商品。
3、But farmers exceeded the quota by about 18%, tempted by almost 100% increase in prices of the flue-cured variety (FCV) of tobacco, grown largely in Andhra Pradesh and Karnataka.───但是,在主要生長(cháng)于安德·拉邦和卡納塔克邦的弗吉尼亞烤煙價(jià)格幾乎上漲100%的誘惑下,煙農們種植的煙草超過(guò)配額約18%。
4、Your mailbox quota was exceeded. All messages to your address will be rejected.───你的郵箱空間已滿(mǎn)。所有給你發(fā)到這個(gè)地址的郵件都將被拒收。
quota exceeded相似詞語(yǔ)短語(yǔ)
1、proceeded───繼續;進(jìn)行
2、exceeder───超越者
3、exceeded───adj.非常的;過(guò)度的;溢出的;v.超過(guò)(exceed的過(guò)去分詞);越出
4、outweeded───被淘汰了。
5、outspeeded───在速度上超過(guò)
6、interceded───vi.調解,調停;求情,說(shuō)項
7、overseeded───翻譯
8、anteceded───v.在……之前或前面,先于
9、to exceed───超過(guò)
2、localstorage的使用(緩存)
在微信公眾號看到了一篇文章,截取一些重點(diǎn)做筆記,篇尾附上原文出處。
1. localStorage出現的需求和目的
localStorage出現是為了彌補cookie(4k)容量過(guò)小的問(wèn)題,localStorage在大部分電腦是5m。與localStorage同時(shí)出現的還有sessionStorage,sessionStorage是會(huì )話(huà)級,頁(yè)面關(guān)閉,自動(dòng)清除,localStorage需要清除行為才能清除。
2. 操作方法
新增(替換),獲取,單個(gè)移除,全部移除:
1. window.localStorage.setItem(key,value)
2. window.localStorage.getItem(key)
3. window.localStorage.removeItem(key)
4. window.localStorage.clear(key)
window是可以省略的,且需要注意的是:簡(jiǎn)單數據類(lèi)型和復雜數據類(lèi)型都可以存儲在localStorage當中,但是對于引用數據類(lèi)型,需要進(jìn)行序列化和反序列化,說(shuō)人話(huà)就是用JSON.stringify()轉換為json字符串,同理獲取的時(shí)候可以恢復為原來(lái)的數據
3. 注意的地方
1. 當存量接近最大值時(shí),getItem的速度大大降低。
2. setItem時(shí),如果存量加上添加量大于上限,那么就會(huì )出錯,需要捕捉錯誤:
try {
localStorage.setItem(key, value);
} catch(e) {
if (isQuotaExceeded(e)) {
// Storage full, maybe notify user or do some clean-up
}
}
function isQuotaExceeded(e) {
var quotaExceeded = false;
if (e) {
if (e.code) {
switch (e.code) {
case 22:
quotaExceeded = true;
break;
case 1014:
// Firefox
if (e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {
quotaExceeded = true;
}
break;
}
} else if (e.number === -2147024882) {
// Internet Explorer 8
quotaExceeded = true;
}
}
return quotaExceeded;
}
4. 加載和緩存靜態(tài)資源
后邊實(shí)在是太長(cháng),直接扔 原文 吧
版權聲明: 本站僅提供信息存儲空間服務(wù),旨在傳遞更多信息,不擁有所有權,不承擔相關(guān)法律責任,不代表本網(wǎng)贊同其觀(guān)點(diǎn)和對其真實(shí)性負責。如因作品內容、版權和其它問(wèn)題需要同本網(wǎng)聯(lián)系的,請發(fā)送郵件至 舉報,一經(jīng)查實(shí),本站將立刻刪除。