Methods and systems for rewriting scripts to redirect web requests

US10574771B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10574771-B2
Application numberUS-201916365554-A
CountryUS
Kind codeB2
Filing dateMar 26, 2019
Priority dateJul 8, 2016
Publication dateFeb 25, 2020
Grant dateFeb 25, 2020

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A method is performed at a proxy server having one or more processors and memory. The memory stores instructions configured for execution by the one or more processors. The proxy server is coupled to one or more web servers and a user device. The proxy server receives, from the user device, a request for a web page provided by a first web server. The proxy server receives the web page, in response to the request, from the first web server. The web page includes a script. The proxy server scans the script to identify one or more URLs that specify requests directed to servers other than the proxy server. For each of the one or more URLs, the proxy server rewrites the script to redirect requests for the respective URL through the proxy server. The proxy server then sends the web page, including the rewritten script, to the user device.

First claim

Opening claim text (preview).

What is claimed is: 1. A method, comprising: at a proxy server having one or more processors and memory storing instructions for execution by the one or more processors, wherein the proxy server is coupled to one or more web servers and a user device: receiving, from the user device, a first request for a web page provided by a first web server; receiving, in response to the first request, the web page from the first web server, wherein the web page includes a script; scanning the script to identify one or more URLs that specify requests directed to servers other than the proxy server; for each of the one or more URLs, rewriting the script to redirect requests for the respective URL through the proxy server; and sending the web page, including the rewritten script, to the user device. 2. The method of claim 1 , wherein the web page is a zero-rated web page that is retrievable by the user device for free. 3. The method of claim 1 , wherein a first URL of the one or more URLs is generated by a first function in the script and rewriting the script comprises replacing the first function with a customized function that directs requests through the proxy server. 4. The method of claim 3 , wherein scanning the script comprises: converting the script into an abstract syntax tree (AST) structure; and searching the AST structure to identify the first function. 5. The method of claim 4 , further comprising injecting a customized script, defining the customized function, into the web page. 6. The method of claim 5 , wherein the customized script defining the customized function is injected into a portion of the web page that defines metadata of the web page. 7. The method of claim 1 , wherein a first URL of the one or more URLs is generated by a first function in the script and rewriting the script comprises blocking the first function. 8. The method of claim 1 , wherein: the script comprises HTML code; scanning the script identifies the one or more URLs in the HTML code; and rewriting the script includes rewriting each of the one or more URLs to include an identifier of the proxy server. 9. The method of claim 1 , further comprising storing the rewritten script in a database of the proxy server. 10. The method of claim 9 , further comprising: receiving a second request for the web page from a requesting device; and in response to the second request, sending the rewritten script of the web page stored in the database to the requesting device. 11. The method of claim 10 , wherein the requesting device is the user device. 12. The method of claim 10 , wherein the requesting device is a computing device other than the user device. 13. A proxy server, comprising: one or more processors; memory; and one or more programs stored in the memory and configured for execution by the one or more processors, the one or more programs comprising instructions for: receiving, from a user device, a first request for a web page provided by a first web server; receiving, in response to the first request, the web page from the first web server, wherein the web page includes a script; scanning the script to identify one or more URLs that specify requests directed to servers other than the proxy server; for each of the one or more URLs, rewriting the script to redirect requests for the respective URL through the proxy server; and sending the web page, including the rewritten script, to the user device. 14. The proxy server of claim 13 , wherein a first URL of the one or more URLs is generated by a first function in the script and rewriting the script comprises replacing the first function with a customized function that directs requests through the proxy server. 15. The proxy server of claim 14 , wherein scanning the script comprises: converting the script into an abstract syntax tree (AST) structure; and searching the AST structure to identify the first function. 16. The proxy server of claim 14 , wherein the one or more programs further comprise instructions for injecting a customized script, defining the customized function, into the web page. 17. The proxy server of claim 16 , wherein the customized script defining the customized function is injected into a portion of the web page that defines metadata of the web page. 18. The proxy server of claim 13 , wherein a first URL of the one or more URLs is generated by a first function in the script and rewriting the script comprises blocking the first function. 19. The proxy server of claim 13 , wherein: the script comprises HTML code; scanning the script identifies the one or more URLs in the HTML code; and rewriting the script includes rewriting each of the one or more URLs to include an identifier of the proxy server. 20. A non-transitory computer-readable storage medium storing one or more programs configured for execution by one or more processors of an electronic device, the one or more programs including instructions for: receiving, from a user device, a first request for a web page provided by a first web server; receiving, in response to the first request, the web page from the first web server, wherein the web page includes a script; scanning the script to identify one or more URLs that specify requests directed to servers other than the proxy server; for each of the one or more URLs, rewriting the script to redirect requests for the respective URL through the proxy server; and sending the web page, including the rewritten script, to the user device.

Assignees

Inventors

Classifications

  • URL specific, e.g. using aliases, detecting broken or misspelled links · CPC title

  • Search customisation based on user profiles and personalisation · CPC title

  • H04L67/02Primary

    based on web technology, e.g. hypertext transfer protocol [HTTP] · CPC title

  • Electricity · mapped topic

  • H04L67/563Primary

    Data redirection of data network streams · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10574771B2 cover?
A method is performed at a proxy server having one or more processors and memory. The memory stores instructions configured for execution by the one or more processors. The proxy server is coupled to one or more web servers and a user device. The proxy server receives, from the user device, a request for a web page provided by a first web server. The proxy server receives the web page, in respo…
Who is the assignee on this patent?
Facebook Inc
What technology area does this patent fall under?
Primary CPC classification H04L67/02. Mapped technology areas include Electricity.
When was this patent published?
Publication date Tue Feb 25 2020 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 12 related publications on this page (citations in our corpus or others sharing the same primary CPC).