IP Library Granted Patent US 12,248,398
Granted Patent B2
US 12,248,398 · App. 17/988,223 · Granted Mar 11, 2025

Service worker for version management

Inventor: Miguel Jimenez Esun (Madrid, ES)
Assignee: Stripe, Inc.
G06F12/0802G06F16/9574G06F2212/60
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,248,398
App. No.
17/988,223
Granted
Mar 11, 2025
Kind
B2
Abstract

In an example embodiment, a solution is provided that balances between speed of access and capabilities of an accessed file. More specifically, the concept of a service worker is introduced. The service worker has the ability to intercept requests, such as HTTP requests, for file and to modify them, if necessary. By acting as a middleman between the web browser instance and the web server, the service worker is able to elect to choose to either request versions of files in the cache or to allow the older versions of the files in the cache to remain and be used, balancing between the need for timely responses to requests for files and the need to have updated versions of the files be used. It can then modify web requests from the web browser (such as from web workers of a browser context) as needed to accomplish the aforementioned balance.

Claims (59)

1. A method for reducing latencies when synchronizing web page data across a plurality of active browsing tabs of a single web browser operating on a single system, the method comprising:

initializing, at a first system executing a single web browser, a single shared service worker shared by a plurality of active browsing tabs of the single web browser;

registering, in a cache associated with the single shared service worker, a first request from a first web worker of a first active browsing tab for a web page data, the first request associated with a first version of a web page hosted by a web server;

intercepting, at the single shared service worker, a second request from a second web worker of a second active browsing tab for the web page data;

confirming, at the single shared service worker, that the web page was updated at the web server;

in response to confirming that the web page data was updated, tracking, at the single shared service worker, subsequent requests for the web page data; and

in response to identifying, at the single shared service worker, the second request, synchronizing the updated web page data with the second web worker.

2. The method of claim 1 , further comprising:

when the single shared service worker is idle, requesting a newest version of the web page data from a content delivery network; and

storing the newest version of the web page data in the cache.

3. The method of claim 2 , wherein the single shared service worker is idle when it is not active and when it is not waiting on outstanding requests made to the web server or the content delivery network.

4. The method of claim 1 , further comprising:

in response to a determination by the web server that the web page data was not updated:

receiving, by the single shared service worker and from the web server, a newest version of the web page data;

receiving, at the single shared service worker, a request from at least one web worker for the web page data corresponding to the newest version of the web page data;

obtaining the web page data corresponding to the newest version of the web page from a content delivery network;

storing the web page data corresponding to the newest version of the web page data in the cache; and

returning the web page data corresponding to the newest version of the web page data to the browser for rendering.

5. The method of claim 4 , wherein the newest version of the web page data from the content delivery network contains only files that were not already present in the cache by virtue of a differ operation performed by the content delivery network between the web page data and another web page data previously loaded into the cache.

6. A system for reducing latencies when synchronizing data at a cache of a device with data at a server, the system comprising:

one or more processors;

at least one memory storing instructions that, when executed by at least one processor among the one or more processors, cause at least one processor to perform operations comprising:

initializing, at a first system executing a single web browser, a single shared service worker shared by a plurality of active browsing tabs of the single web browser;

registering, in a cache associated with the single shared service worker, a first request from a first web worker of a first active browsing tab for a web page data, the first request associated with a first version of a web page hosted by a web server;

intercepting, at the single shared service worker, a second request from a second web worker of a second active browsing tab for the web page data;

confirming, at the single shared service worker, that the web page was updated at the web server;

in response to confirming that the web page data was updated, tracking, at the single shared service worker, subsequent requests for the web page data; and

in response to identifying, at the single shared service worker, the second request, synchronizing the updated web page data with the second web worker.

7. The system of claim 6 , wherein the operations further comprise:

when the single shared service worker is idle, requesting a newest version of the web page data from a content delivery network; and

storing the newest version of the web page data in the cache.

8. The system of claim 7 , wherein the single shared service worker is idle when it is not active and when it is not waiting on outstanding requests made to the web server or the content delivery network.

9. The system of claim 6 , wherein the operations further comprise:

in response to a determination by the web server that the web page data was not updated:

receiving, by the single shared service worker and from the web server, a newest version of the web page data;

receiving, at the single shared service worker, a request from at least one web worker for the web page data corresponding to the newest version of the web page data;

obtaining the web page data corresponding to the newest version of the web page from a content delivery network;

storing the web page data corresponding to the newest version of the web page data in the cache; and

returning the web page data corresponding to the newest version of the web page data to the browser for rendering.

10. The system of claim 9 , wherein the newest version of the web page data from the content delivery network contains only files that were not already present in the cache by virtue of a differ operation performed by the content delivery network between the web page data and another web page data previously loaded into the cache.

11. A non-transitory machine-readable medium comprising instructions which, when read by a machine, cause the machine to perform operations comprising:

initializing, at a first system executing a single web browser, a single shared service worker shared by a plurality of active browsing tabs of the single web browser;

registering, in a cache associated with the single shared service worker, a first request from a first web worker of a first active browsing tab for a web page data, the first request associated with a first version of a web page hosted by a web server;

intercepting, at the single shared service worker, a second request from a second web worker of a second active browsing tab for the web page data;

confirming, at the single shared service worker, that the web page was updated at the web server;

in response to confirming that the web page data was updated, tracking, at the single shared service worker, subsequent requests for the web page data; and

in response to identifying, at the single shared service worker, the second request, synchronizing the updated web page data with the second web worker.

12. The non-transitory machine-readable medium of claim 11 , wherein the operations further comprise:

when the single shared service worker is idle, requesting a newest version of the web page data from a content delivery network; and

storing the newest version of the web page data in the cache.

13. The non-transitory machine-readable medium of claim 12 , wherein the single shared service worker is idle when it is not active and when it is not waiting on outstanding requests made to the web server or the content delivery network.

14. The non-transitory machine-readable medium of claim 11 , wherein the operations further comprise:

in response to a determination by the web server that the web page data was not updated:

receiving, by the single shared service worker and from the web server, a newest version of the web page data;

receiving, at the single shared service worker, a request from at least one web worker for the web page data corresponding to the newest version of the web page data;

obtaining the web page data corresponding to the newest version of the web page from a content delivery network;

storing the web page data corresponding to the newest version of the web page data in the cache; and

returning the web page data corresponding to the newest version of the web page data to the browser for rendering.

15. The non-transitory machine-readable medium of claim 14 , wherein the newest version of the web page data from the content delivery network contains only files that were not already present in the cache by virtue of a diff operation performed by the content delivery network between the first version of the web page data and the newest version of the web page data.

Assignments (2)
CHANGE OF NAME Recorded Jan 7, 2026
From: STRIPE, INC.
To: STRIPE, LLC
Reel/Frame 074264/0807 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 16, 2022
From: ESUN, MIGUEL JIMENEZ
To: STRIPE, INC.
Reel/Frame 061801/0089 →
Continuity (1)
Related Publication 20240160569A1 · May 16, 2024
References Cited (5)
US 9639629B1 · Venkat · 2017 [cited by examiner]
US 20020056100A1 · Shimomura · 2002 [cited by examiner]
US 20120260157A1 · Zhu · 2012 [cited by examiner]
US 20170300183A1 · Barrus · 2017 [cited by examiner]
CN 106599146B · 2021 [cited by examiner]