EBWebView Cache Directory Cleanup Report

1. Purpose of This Report

This report aims to guide developers and operations personnel in safely cleaning up the temporary cache files under the EBWebView directory, optimizing storage usage and improving WebView performance without affecting core functionality and persistent data.

2. Cleanup Principles

Without removing persistent data (such as configuration, login state, and core functional data), only delete various temporary caches, crash reports, trial data, and rendering caches and other non-core files/folders. Core persistent files/folders must be strictly preserved.

3. Content That Can Be Safely Deleted

3.1 Folders (all temporary caches / non-core data)

Folder NameTypeDescription
AutoLaunchProtocolsComponentTemporary cacheAuto-launch protocol component cache
CertificateRevocationTemporary cacheCertificate revocation list cache
component_crx_cacheTemporary cacheComponent CRX cache
CrashpadCrash reportCrash reports and dump files
Domain ActionsTemporary cacheDomain action cache
extensions_crx_cacheTemporary cacheExtension CRX cache
GraphiteDawnCacheRendering cacheGraphics rendering cache
GrShaderCacheShader cacheGraphics shader cache
hyphen-dataTemporary cacheHyphenation data cache
MEIPreloadTemporary cacheMEI preload data
OriginTrialsTrial dataOrigin trial feature cache
PKIMetadataTemporary cachePKI metadata cache
ShaderCacheShader cacheWebGL shader cache
SmartScreenTemporary cacheSmartScreen filter cache
Speech RecognitionSpeech cacheSpeech recognition feature cache
Subresource FilterFilter cacheSubresource filtering rules cache
Trust Protection ListsTemporary cacheTrust protection list cache
TrustTokenKeyCommitmentsTemporary cacheTrust token key commitments cache

3.2 Files (temporary / cache type)

File NameTypeDescription
Last VersionTemporary fileLast version record
RevisitationBloomfilterCache filePage revisitation Bloom filter
VariationsTemporary fileFeature variation configuration

4. Core Persistent Data That Must Not Be Deleted

File/Folder NameTypeDescriptionRisk
Local StateConfiguration fileWebView core local configuration file, containing settings, preferences, and other persistent informationDeletion will lose all WebView configurations
WidevineCdmCore moduleDRM content decryption moduleDeletion will prevent protected videos (such as certain online streaming media) from playing
DefaultUser dataDefault user data directory (containing persistent data such as Cookies, LocalStorage, IndexedDB)Deleting the entire folder is prohibited; only internal cache subdirectories may be deleted

4.1 Default Directory Cleanup Recommendations

Although the Default directory must not be deleted as a whole, some of its subdirectories can be safely cleaned up:

Default SubdirectoryCleanup StatusDescription
Cache✅ CleanablePage resource cache
Code Cache✅ CleanableJavaScript code cache
GPUCache✅ CleanableGPU acceleration cache
Media Cache✅ CleanableMedia resource cache
Service Worker/CacheStorage✅ CleanableService Worker cache
Cookies❌ Must not be cleanedUser login state data
Local Storage❌ Must not be cleanedLocal storage data
IndexedDB❌ Must not be cleanedIndexed database
WebSQL❌ Must not be cleanedWeb SQL database

5. Cleanup Impact Assessment

Impact CategoryImpact LevelDescription
Core functionalityNo impactOnly temporary caches are deleted, which does not affect WebView core functionality
Login stateNo impactLogin state is usually stored in Cookies or LocalStorage and will not be cleaned
Configuration preferencesNo impactCore configuration files are protected and will not be cleaned
First-load performanceMinor impactAfter cleanup, the first page load will re-download resources, with a brief impact
Storage spaceSignificant optimizationA large amount of storage space occupied by temporary caches can be freed
Privacy and securityBeneficialClearing caches can reduce the risk of privacy data leakage

6. Cleanup Recommendations

  1. Periodic cleanup: It is recommended to perform a cache cleanup every 1-3 months, adjusted according to application usage frequency
  2. On-demand cleanup: When the application experiences performance issues or insufficient storage space, a temporary cleanup can be performed
  3. Automated cleanup: Consider automatically cleaning up temporary caches at application startup or periodically in the background
  4. Selective cleanup: Selectively clean up specific types of caches based on actual needs
  5. Backup recommendation: Before performing a large-scale cleanup, it is recommended to back up core configuration files to prevent accidents

7. Cleanup Execution Methods

7.1 Manual Cleanup

  1. Close all applications using EBWebView
  2. Navigate to the EBWebView directory
  3. Delete the safely cleanable files and folders according to this report
  4. Restart the application; WebView will automatically regenerate the necessary cache files

7.2 Programmatic Cleanup

Automated cleanup can be implemented through the WebView API or the file system API.

JadeView also provides the programmatic entry point clear_data_directory(confirm_token): when confirm_token equals "I_UNDERSTAND_CLEAR_DATA", it clears the entire data directory (i.e. the data_directory passed to JadeView_init), returning 1 on success and 0 on failure or when the confirmation token does not match.

⚠️ Note the distinction: this API clears the entire data directory (including the "core persistent data that must not be deleted" listed above) and is a "reset/uninstall"-level operation. It is not the same as the EBWebView temporary-cache subdirectory cleanup described in this document. If you only want to reclaim space while preserving login state and configuration, follow Section 3 to manually/selectively clean the cache subdirectories and do not use clear_data_directory.

8. Notes

  1. Cleanup timing: It is recommended to perform cleanup before application startup or when the background is idle
  2. Permission requirements: Cleanup operations may require file system read/write permissions
  3. Cross-platform differences: WebView cache structures may differ across platforms; adjust according to actual conditions
  4. Version compatibility: Different versions of EBWebView may have different cache directory structures; pay attention to version updates
  5. Test verification: Before deploying cleanup logic to a production environment, it is recommended to thoroughly verify it in a test environment