# US 2019/0320035 A1 · Method and Apparatus for Automatically Optimizing the Loading of Images in a Cloud-Based Proxy Service

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0320035 A1
- Document ID: US20190320035A1
- Status: Published application
- Kind: A1
- Application number: 16/357,766
- Filed: 2019-03-19
- Published: 2019-10-17
- Earliest claimed: 2013-05-15
- Assignees: Cloudflare, Inc.
- Applicants: Cloudflare, Inc.
- Inventors: Christopher Stephen Joel; Lee Hahn Holloway; Dane Orion Knecht; Albertus Strasheim
- Web page: https://patentgrep.com/patent/US20190320035A1

## CPC

- G06F 16/9574: {of access to content, e.g. by caching}
- G06F 16/95: Retrieval from the web
- G06F 40/151: Transformation
- G06F 40/166: Editing, e.g. inserting or deleting
- H04L 67/02: based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L 67/565: Conversion or adaptation of application format or content (adding application control or application functional data H04L67/561)
- H04L 67/566: Grouping or aggregating service requests, e.g. for unified processing
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A request for a web page is received at a proxy server. The request originates from a client network application of a client device. The requested web page includes multiple references to multiple images. The proxy server retrieves the requested web page. The proxy server modifies code of the retrieved web page such that the client network application will not, for each one of those images, initially request those images when parsing the page. The proxy server also adds code to the retrieved web page that, when executed by the client network application, causes at least two of the images to be requested with a single request. The proxy server transmits the modified web page to the client device.

## Claims

### Claim 1

A method for automatically optimizing the loading of images of a web page, the method comprising:
receiving a request for the web page, the request originating from a client network application of a client device, the web page including a plurality of references to a plurality of images respectively;
retrieving the requested web page;
modifying the retrieved web page including adding code to the retrieved web page that, when executed by the client network application, cause at least two of the plurality of images to be requested with a single request;
transmitting the modified web page to the client device;
receiving from the client network application of the client device, the single request for at least two of the images referenced in the modified web page, wherein the at least two of the images are sourced at different domains;
retrieving the at least two of the images; and
transmitting a single response to the client network application that includes the at least two of the images.

### Claim 2

(canceled)

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
wherein prior to transmitting the at least two images to the client network application,
degrading the retrieved at least two of the images to reduce the file size of the at least two of the images; and
wherein the at least two images transmitted to the client network application are degraded.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
wherein the at least two of the images are different types; and
encoding at least one of the at least two images such that all of the at least two images are of a same type.

### Claim 5

(canceled)

### Claim 6

(canceled)

### Claim 7 (depends on 3)

The method of claim 3, further comprising:
receiving, from the client network application of the client device, a request for one of the at degraded at least two of the images in a full-quality version of that image;
retrieving the requested image, wherein the retrieved image is a full-quality version of the image; and
transmitting the full-quality version of the image to the client network application.

### Claim 8 (depends on 1)

The method of claim 1, wherein the added code includes a set of one or more client-side scripts and/or a set of one or more references to one or more client-side scripts that, when executed by the client network application, cause the at least two of the plurality of images to be requested with the single request.

### Claim 9

A method in a client device for automatically optimizing the loading of images of a web page while rendering the web page, the method comprising:
receiving a web page that includes a plurality of references to a plurality of images respectively, wherein the web page includes code to optimize the loading of the plurality of images; and
executing the code to optimize the loading of the plurality of images, wherein executing the code causes a single request for at least two of the plurality of images to be generated and transmitted;
responsive to the transmitted single request, receiving the at least two of the plurality of images in a single response, wherein the at least two of the images are sourced at different domains; and
displaying the received at least two of the plurality of images in their respective appropriate locations.

### Claim 10

(canceled)

### Claim 11 (depends on 9)

The method of claim 9, wherein the at least two of the plurality of images are degraded versions.

### Claim 12 (depends on 11)

The method of claim 11, wherein executing the code to optimize the loading of the plurality of images further causes the following:
determining whether each one of the plurality of images is locally available to the client device either in their full quality version or in a degraded version, wherein the at least two of the plurality of images that are transmitted are not locally available to the client device;
for each one of the plurality of images that is locally available to the client device in its degraded version, displaying those degraded versions in their appropriate locations of the page.

### Claim 13 (depends on 12)

The method of claim 12, wherein executing the code to optimize the loading of the plurality of images further causes the following:
after the web page is finished loading, transmitting requests for full quality versions of those images that were displayed in degraded form; and
for each full quality version of those images that are received in response to the requests, replacing the degraded version of that image with its full quality version counterpart.

### Claim 14 (depends on 13)

The method of claim 13, wherein only those ones of the images that have a reference whose location in the web page where the corresponding image is to be displayed is within a viewport of the client network application or within a defined distance from the viewport are requested in their full quality versions.

### Claim 15

A non-transitory machine-readable storage medium that provides instructions that, when executed by a processor, cause the processor to perform operations for automatically optimizing the loading of images of a web page, the operations comprising:
receiving a request for the web page, the request originating from a client network application of a client device, the web page including a plurality of references to a plurality of images respectively;
retrieving the requested web page;
modifying the retrieved web page including adding code to the retrieved web page that, when executed by the client network application, cause at least two of the plurality of images to be requested with a single request;
transmitting the modified web page to the client device;
receiving from the client network application of the client device, the single request for at least two of the images referenced in the modified web page, wherein the at least two of the images are sourced at different domains;
retrieving the at least two of the images; and
transmitting a single response to the client network application that includes the at least two of the images.

### Claim 16 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the operations further comprise:
wherein the at least two of the images are different types; and
encoding at least one of the at least two images such that all of the at least two images are of a same type.

### Claim 17 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the added code includes a set of one or more client-side scripts and/or a set of one or more references to one or more client-side scripts that, when executed by the client network application, cause the at least two of the plurality of images to be requested with the single request.

### Claim 18 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the operations further comprise:
wherein prior to transmitting the at least two images to the client network application, degrading the retrieved at least two of the images to reduce the file size of the at least two of the images; and
wherein the at least two images transmitted to the client network application are degraded.

### Claim 19 (depends on 18)

The non-transitory machine-readable storage medium of claim 18, wherein the operations further comprise:
receiving, from the client network application of the client device, a request for one of the at degraded at least two of the images in a full-quality version of that image;
retrieving the requested image, wherein the retrieved image is a full-quality version of the image; and
transmitting the full-quality version of the image to the client network application.

### Claim 20

A non-transitory machine-readable storage medium that provides instructions that, when executed by a processor of a client device, cause the processor to perform operations for automatically optimizing the loading of images of a web page, the operations comprising:
receiving a web page that includes a plurality of references to a plurality of images respectively, wherein the web page includes code to optimize the loading of the plurality of images; and
executing the code to optimize the loading of the plurality of images, wherein executing the code causes a single request for at least two of the plurality of images to be generated and transmitted;
responsive to the transmitted single request, receiving the at least two of the plurality of images in a single response, wherein the at least two of the images are sourced at different domains; and
displaying the received at least two of the plurality of images in their respective appropriate locations.

### Claim 21 (depends on 20)

The non-transitory machine-readable storage medium of claim 20, wherein the at least two of the plurality of images are degraded versions.

### Claim 22 (depends on 21)

The non-transitory machine-readable storage medium of claim 21, wherein executing the code to optimize the loading of the plurality of images further causes the following:
determining whether each one of the plurality of images is locally available to the client device either in their full quality version or in a degraded version, wherein the at least two of the plurality of images that are transmitted are not locally available to the client device;
for each one of the plurality of images that is locally available to the client device in its degraded version, displaying those degraded versions in their appropriate locations of the page.

### Claim 23 (depends on 22)

The non-transitory machine-readable storage medium of claim 22, wherein executing the code to optimize the loading of the plurality of images further causes the following:
after the web page is finished loading, transmitting requests for full quality versions of those images that were displayed in degraded form; and
for each full quality version of those images that are received in response to the requests, replacing the degraded version of that image with its full quality version counterpart.

### Claim 24 (depends on 23)

The non-transitory machine-readable storage medium of claim 23, wherein only those ones of the images that have a reference whose location in the web page where the corresponding image is to be displayed is within a viewport of the client network application or within a defined distance from the viewport are requested in their full quality versions.
