팩토리 » Api

storageclear

Description

웹스토리지에 저장된 모든 키를 삭제하는 API이다.

Parameters

Parameters Type Description
nStorageType short 스토리지 종류

Return Value

Type Description
BOOL 정상 처리 여부

Remark

스토리지 종류는 아래와 같다.
0 : 세션스토리지(sessionStorage)
1 : 로컬스토리지(localStorage)

* 세션스토리지
  - 도메인에 대해서 세션이 유지되는 동안만 데이터가 유지된다.
  - iframe간에만 정보가 공유된다.
** 로컬스토리지
  - 도메인에 대해서 명시적으로 삭제하기 전까지 데이터가 영구히 유지된다.
  - 오리진이 같은 경우 모든 탭과 창에서 정보가 공유된다.

Example

function btn_clearstorage_on_mouseup(objInst) { //세션스토리지의 키 전체 삭제 factory.storageclear(0); //로컬스토리지의 키 전체 삭제 factory.storageclear(1); }

See Also

storagegetcount
storagegetkey
storagegetkeylist
storagegetitem
storagesetitem
storageremoveitem

Viewer Ver.

9.1.1.1

Update Date

20210120