Web Browser Cookie Garbage Collection via Dual-Status Monitoring
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In web browsers, the accumulation of persistent cookies from multiple independent application operators within a domain can lead to an overflow of input buffers on web servers, causing detrimental effects due to unmanaged cookie growth.
Innovation Solution
A method and system utilizing two cookies with different expiration periods to indicate the cleanliness status of a web browser, where the presence of both cookies indicates a clean status and triggers no action, while the absence of the long-term cookie initiates garbage collection, ensuring proactive cleaning of non-essential cookies through a scheduling mechanism and cleaning module.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Duration of action of stationary object
If application operators set persistent cookies with wide scopes to ensure coverage, then cookie persistence and coverage are improved, but input buffer overflow on web servers occurs
Solution Approach 1:
The system performs preliminary garbage collection of cookies before buffer overflow occurs. A scheduling mechanism detects when cookie accumulation reaches a threshold and proactively removes unnecessary cookies, preventing the harmful buffer overflow condition before it happens.
Solution Approach 2:
The system implements feedback through status cookies that monitor the cookie accumulation state. When the number of cookies exceeds a threshold, a status cookie is set to trigger garbage collection. This feedback loop continuously monitors and responds to cookie accumulation, maintaining system health.
2Object-affected harmful factors
If garbage collection is performed frequently to prevent buffer overflow, then buffer overflow is prevented, but system performance and user experience deteriorate
Solution Approach 1:
Instead of continuous or frequent garbage collection, the system uses periodic action triggered by status cookies. Garbage collection is performed only when necessary (when cookie count exceeds threshold), rather than at fixed intervals, optimizing the balance between preventing overflow and maintaining performance.
Solution Approach 2:
The system changes parameters dynamically by adjusting the garbage collection trigger based on cookie accumulation thresholds. The status cookie mechanism allows the system to adapt the collection frequency to actual needs, collecting only when the cookie count parameter exceeds a defined threshold, thus avoiding unnecessary performance impact.
Data Source
AI summary
The disclosure is directed to garbage cleaning of cookies in a web browser. A computer-implemented process according to embodiments includes: determining a presence of a first cookie and a second cookie in the web browser, the first cookie and the second cookie representing a cleanliness status of the web browser; in response to determining that the first cookie and the second cookie are both present in the web browser, indicating a status of the web browser as clean and taking no further cleaning action; and in response to determining that only the first cookie is present in the web browser, indicating the status of the web browser as needs cleaning, and performing garbage collection of cookies in the web browser.


