Methods and Systems for Rewriting Scripts to Direct Requests

US10277701B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10277701-B2
Application numberUS-201615205926-A
CountryUS
Kind codeB2
Filing dateJul 8, 2016
Priority dateJul 8, 2016
Publication dateApr 30, 2019
Grant dateApr 30, 2019

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.

Methods and systems for rewriting scripts by a server system to direct requests generated from the scripts to pass through the server system. The proxy server receives a first request from the user device for a web page provided by a first web server. The proxy server then receives the web page from the first web server in response to the first request. The proxy server processes the web page. For example, the proxy server rewrites a script in the web page to direct requests generated by the script through the proxy server. The proxy server sends the processed 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; determining whether a script in the web page includes any functions that would cause the user device to send a request to a URL; in accordance with a determination that the web page includes one or more functions that would cause the user device to send a request to a URL: processing the web page, comprising rewriting the script in the web page to direct requests generated by the script through the proxy server; and sending the processed 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 , further comprising, at the proxy server: in accordance with a determination that the web page includes a first function that would cause the user device to send a request to a URL, replacing the first function with a customized function that directs requests through the proxy server. 4. The method of claim 1 , wherein rewriting the script comprises: converting the script into an abstract syntax tree (AST) structure; searching the AST structure to identify any functions that would cause the user device to send a request to a URL; and replacing a first identified function with a call to a customized function that directs a request through the proxy server. 5. The method of claim 4 , wherein one or more functions that would cause the user device to send a request to a URL cannot be assigned to customized functions to direct requests through the proxy server, the method further comprising, at the proxy server: providing a list of one or more second functions that can be assigned to customized functions to direct requests through the proxy server; and prior to rewriting the script, determining whether the script comprises any functions from the list; wherein the converting, searching, and causing are performed in accordance with a determination that any functions in the script are not from the list. 6. The method of claim 4 , further comprising, at the proxy server, injecting a customized script defining the customized function into the web page. 7. The method of claim 6 , wherein the customized script defining the customized functions is injected into a portion of the web page that defines metadata of the web page. 8. The method of claim 1 , wherein processing the web page comprises: determining whether the script comprises any functions that would cause the user device to send a request to a URL; and in accordance with a determination that a respective function in the script matches a function that would cause the user device to send a request to a URL, blocking the respective function. 9. The method of claim 1 , wherein the script comprises HTML code, and wherein the method further comprises: identifying one or more URLs in the HTML code; and rewriting the one or more URLs to include the identifier of the proxy server. 10. The method of claim 1 , further comprising storing the rewritten script in a database of the proxy server. 11. The method of claim 10 , further comprising, at the proxy server: receiving a second request for the web page from a requesting device; and responding to the second request, comprising sending the rewritten script of the web page stored in the database to the requesting device. 12. A method, comprising: at a computing device having one or more processors and memory storing instructions for execution by the one or more processors, wherein the computing device is coupled to a proxy server: displaying a list of identifiers of one or more web pages provided by respective web servers, wherein the one or more web pages are zero-rated; sending, to the proxy server, a request for a first web page provided by a first web server; and in response to the request, receiving, from the proxy server, a first web page processed by the proxy server, the first web page including a script that has been rewritten by the proxy server to direct requests generated by the script through the proxy server. 13. The method of claim 12 , further comprising, at the computing device: providing a policy specifying actions allowed by a web browser running on the computing device. 14. The method of claim 13 , wherein providing the policy comprises: providing a whitelist of sources, wherein a content item from a respective source in the whitelist is allowed to be rendered by a web browser running on the computing device; and wherein the method further comprises: executing the rewritten script of the first web page on the web browser, the rewritten script including instructions for rendering one or more content items included on the first web page; determining, whether the one or more content items are provided by one or more respective sources that are not in the whitelist, and in accordance with a determination that a first content item is provided by a first source listed in the whitelist, rendering the first content item at the web browser. 15. The method of claim 14 , further comprising, at the computing device: in accordance with a determination that a second content item is provided by a second source that is not in the whitelist blocking rendering the second content item; and sending a report including information related to the second source that violates the whitelist to the proxy server. 16. The method of claim 12 , wherein: respective URLs in the rewritten script includes respective rewritten signatures; and the method further comprises, at the computing device, executing the rewritten script, comprising: determining whether all URLs include respective rewritten signatures; in accordance with a determination that a URL does not include a rewritten signature, sending a report including information related to the URL that does not include the rewritten signature to the proxy server. 17. The method of claim 12 , wherein the rewritten script includes one or more URLs rewritten to include the identifier of the proxy server. 18. The method of claim 12 , wherein the rewritten script includes a customized function that directs a request through the proxy server. 19. 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 a web page from a first web server; determining whether a script in the web page includes any functions that would send a request to a URL; in accordance with a determination that the web page includes one or more functions that would cause a user device to send a request to a URL: processing the web page, comprising rewriting the script in the web page to direct requests generated by the script through the proxy server; and sending the processed 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

  • Physics · mapped topic

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 US10277701B2 cover?
Methods and systems for rewriting scripts by a server system to direct requests generated from the scripts to pass through the server system. The proxy server receives a first request from the user device for a web page provided by a first web server. The proxy server then receives the web page from the first web server in response to the first request. The proxy server processes the web page. …
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 Apr 30 2019 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).