Offline Browser Resource Caching via URI Hash Mapping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Users cannot view previously accessed webpages when a network connection is unavailable or slow, as existing browser technologies do not allow offline access to stored web resources.
Innovation Solution
A system and method that generates a hash from a URI associated with a resource, maps it to a local file path, and stores the resource for offline access, while managing storage by identifying and removing the least recently used webpages to maximize display, ensuring resources shared across multiple pages are not removed until their count falls below a threshold.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If webpages are stored in disk storage for offline access, then offline viewing capability is improved, but storage space is consumed
Solution Approach 1:
The system segments web resources into individual downloadable components (HTML, CSS, JavaScript, images) that can be stored and reassembled offline. Each resource is stored separately in disk storage with its URI mapped to a local file path, allowing selective caching of only necessary resources rather than entire websites.
Solution Approach 2:
The system changes the state of web resources from online-only access to offline-storable format by generating hashes from URIs and mapping them to local file paths in disk storage. This parameter change enables the same resource to be accessed both online and offline without quality degradation.
2Adaptability or versatility
If more webpages are cached for offline access, then offline browsing options increase, but memory usage increases
Solution Approach 1:
The system dynamically manages cached webpages using a least recently used (LRU) algorithm that automatically identifies and removes less frequently accessed pages when storage capacity is reached. This dynamic adjustment allows the cache to adapt to changing user needs while maintaining optimal storage utilization.
Solution Approach 2:
The system discards least recently used webpages from disk storage when capacity is full, but maintains the ability to recover them by re-downloading from web servers when needed. This ensures continuous adaptability of offline browsing options while managing storage constraints.
3Quantity of substance
If resources are removed from storage to make space, then storage capacity is freed, but completeness of remaining webpages may be compromised
Solution Approach 1:
The system uses resource counters that track how many webpages reference each cached resource. Before removing a resource, the system checks its counter value and only removes it if the count is below a threshold, ensuring that remaining webpages maintain their completeness and functionality.
Solution Approach 2:
The system performs preliminary checks on resource dependencies and usage counts before removing any cached resources. This preliminary action prevents the removal of resources that are critical to the completeness of remaining webpages, thereby maintaining stability of webpage composition.
Data Source
AI summary
According to an embodiment, a system, a method and a computer-program product for managing resources on an offline browser. A client device receives a resource from a web server. The resource is included in a webpage. A hash is generated from a uniform resource identifier (URI) associated with the resource. The generated hash is mapped to a local file path of the resource. The local file path indicates the location of the resource in a disk storage. The resource is stored in the disk storage such that the resource is accessible by a hash when the client device subsequently cannot connect to the web server to download the resource associated with the URI.


