CN111177606B - Method and device for controlling browser to render webpage - Google Patents

Method and device for controlling browser to render webpage Download PDF

Info

Publication number
CN111177606B
CN111177606B CN201911342323.8A CN201911342323A CN111177606B CN 111177606 B CN111177606 B CN 111177606B CN 201911342323 A CN201911342323 A CN 201911342323A CN 111177606 B CN111177606 B CN 111177606B
Authority
CN
China
Prior art keywords
browser
webpage
rendered
compatible mode
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911342323.8A
Other languages
Chinese (zh)
Other versions
CN111177606A (en
Inventor
李海桃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wanghai Kangxin Beijing Technology Co ltd
Original Assignee
Wanghai Kangxin Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wanghai Kangxin Beijing Technology Co ltd filed Critical Wanghai Kangxin Beijing Technology Co ltd
Priority to CN201911342323.8A priority Critical patent/CN111177606B/en
Publication of CN111177606A publication Critical patent/CN111177606A/en
Application granted granted Critical
Publication of CN111177606B publication Critical patent/CN111177606B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for controlling a browser to render a webpage, wherein the method comprises the following steps: a1: acquiring an IP address of a webpage to be rendered of a browser; a2: judging whether the webpage to be rendered needs to start a compatible mode of the browser or not according to the IP address of the webpage to be rendered, and if so, executing A3; a3: judging whether the browser is in a compatible mode, if not, requesting a first registry for starting the compatible mode from a server, and executing A4; a4: and receiving the first registry transmitted by the server, executing the first registry, switching the browser to a compatible mode through the first registry, and controlling the browser to render the webpage to be rendered in the compatible mode. The invention provides a method and a device for controlling a browser to render webpages, which can more conveniently control the browser to render webpages in different working modes.

Description

Method and device for controlling browser to render webpage
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling a browser to render a web page.
Background
During the use of the browser, if the web page is not compatible with the version of the browser, the web page may not be displayed normally. Some web pages need to be opened in a higher version of the browser and some web pages need to be opened in a lower version of the browser. In general, a higher version browser is compatible with a lower version browser, that is, when the higher version browser opens the compatible mode, a web page requiring the lower version browser can be normally displayed.
In the prior art, in which working mode the browser renders is mainly manually switched. Specifically, when the user finds that a certain web page cannot be displayed normally, the user manually switches the operating mode of the browser, and then reopens the web page.
As can be seen from the above description, in the prior art, the browser is controlled to render in different working modes mainly by a manual mode, so that the implementation process is very inconvenient.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling a browser to render webpages, which can more conveniently control the browser to render webpages in different working modes.
In a first aspect, an embodiment of the present invention provides a method for controlling a browser to render a web page, including:
a1: acquiring an IP address of a webpage to be rendered of a browser;
a2: judging whether the webpage to be rendered needs to start a compatible mode of the browser or not according to the IP address of the webpage to be rendered, and if so, executing A3;
a3: judging whether the browser is in a compatible mode, if not, requesting a first registry for starting the compatible mode from a server, and executing A4;
a4: and receiving the first registry transmitted by the server, executing the first registry, switching the browser to a compatible mode through the first registry, and controlling the browser to render the webpage to be rendered in the compatible mode.
Alternatively, the process may be carried out in a single-stage,
the method further comprises the steps of:
b1: when judging that the webpage to be rendered does not need to open a compatible mode, judging whether the browser is in the compatible mode, if so, requesting a second registry for canceling the compatible mode from the server, and executing B2;
b2: and receiving the second registry transmitted by the server, executing the second registry, switching the browser to a non-compatible mode through the second registry, and controlling the browser to render the webpage to be rendered in the non-compatible mode.
Alternatively, the process may be carried out in a single-stage,
the method further comprises the steps of:
pre-storing the IP address of at least one webpage;
the step of judging whether the webpage to be rendered needs to start the compatible mode of the browser according to the IP address of the webpage to be rendered comprises the following steps:
judging whether the IP address of the webpage to be rendered is in the pre-stored IP address of the at least one webpage, if so, determining that the webpage to be rendered needs to be opened in a compatible mode, otherwise, determining that the webpage to be rendered does not need to be opened in the compatible mode.
Alternatively, the process may be carried out in a single-stage,
the obtaining the IP address of the webpage to be rendered of the browser includes:
intercepting an http request sent by the browser, and acquiring the IP address of the webpage to be rendered from the http request.
Alternatively, the process may be carried out in a single-stage,
the method further comprises the steps of:
and when judging that the webpage to be rendered does not need to be opened in the compatible mode and the browser is not in the compatible mode, controlling the browser to render the webpage to be rendered in the incompatible mode.
Alternatively, the process may be carried out in a single-stage,
the method further comprises the steps of:
when judging that the webpage to be rendered needs to open the compatible mode of the browser and the browser is in the compatible mode, controlling the browser to render the webpage to be rendered in the compatible mode.
In a second aspect, an embodiment of the present invention provides an apparatus for controlling a browser to render a web page, including:
the acquisition unit is used for acquiring the IP address of the webpage to be rendered of the browser;
a judging unit configured to perform:
s1: judging whether the webpage to be rendered needs to start a compatible mode of the browser or not according to the IP address of the webpage to be rendered, and executing S2 if the webpage to be rendered needs to start the compatible mode of the browser;
s2: judging whether the browser is in a compatible mode, if not, requesting a first registry for starting the compatible mode from a server, and triggering a first control unit;
the first control unit is configured to receive the first registry sent by the server, execute the first registry, switch the browser to a compatible mode through the first registry, and control the browser to render the webpage to be rendered in the compatible mode.
Alternatively, the process may be carried out in a single-stage,
the judging unit is further used for judging whether the browser is in a compatible mode or not when judging that the webpage to be rendered does not need to open the compatible mode, if so, requesting a second registry for canceling the compatible mode from the server, and triggering the second control unit;
the second control unit is further configured to receive the second registry sent by the server, execute the second registry, switch the browser to a non-compatible mode through the second registry, and control the browser to render the webpage to be rendered in the non-compatible mode.
Alternatively, the process may be carried out in a single-stage,
the apparatus further comprises:
a storage unit for storing the IP address of at least one web page;
the judging unit is configured to judge whether the IP address of the webpage to be rendered is in the pre-saved IP address of the at least one webpage, if so, determine that the webpage to be rendered needs to open a compatible mode, or, if not, determine that the webpage to be rendered does not need to open the compatible mode.
Alternatively, the process may be carried out in a single-stage,
the obtaining unit is used for intercepting an http request sent by the browser and obtaining the IP address of the webpage to be rendered from the http request.
Alternatively, the process may be carried out in a single-stage,
the apparatus further comprises:
and the third control unit is used for controlling the browser to render the webpage to be rendered in the non-compatible mode when judging that the webpage to be rendered does not need to open the compatible mode and the browser is not in the compatible mode.
Alternatively, the process may be carried out in a single-stage,
the apparatus further comprises:
and the fourth control unit is used for controlling the browser to render the webpage to be rendered in the compatible mode when judging that the webpage to be rendered needs to open the compatible mode of the browser and the browser is in the compatible mode.
In the embodiment of the invention, the IP address of the webpage to be rendered is obtained, whether the webpage to be rendered needs to be opened or not can be automatically judged based on the IP address, when the compatible mode of the browser needs to be opened and the browser is not in the compatible mode, the first registry is obtained from the server, the browser can be automatically switched to the compatible mode after the first registry is executed, then the webpage to be rendered is automatically controlled by the browser in the compatible mode, the whole process is automatically completed without manual participation, and the webpage can be more conveniently controlled to be rendered by the browser in different working modes.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for controlling a browser to render a web page according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for controlling a browser to render a web page according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an apparatus for controlling a browser to render a web page according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for controlling a browser to render a web page, including:
step 101: acquiring an IP address of a webpage to be rendered of a browser;
step 102: judging whether the webpage to be rendered needs to start a compatible mode of the browser or not according to the IP address of the webpage to be rendered, and executing step 103 if yes;
step 103: judging whether the browser is in a compatible mode, if not, executing step 104;
step 104: requesting a first registry from the server for initiating a compatibility mode, step 105 being performed;
step 105: and receiving the first registry transmitted by the server, executing the first registry, switching the browser to a compatible mode through the first registry, and controlling the browser to render the webpage to be rendered in the compatible mode.
In the embodiment of the invention, the IP address of the webpage to be rendered is obtained, whether the webpage to be rendered needs to be opened or not can be automatically judged based on the IP address, when the compatible mode of the browser needs to be opened and the browser is not in the compatible mode, the first registry is obtained from the server, the browser can be automatically switched to the compatible mode after the first registry is executed, then the webpage to be rendered is automatically controlled by the browser in the compatible mode, the whole process is automatically completed without manual participation, and the webpage can be more conveniently controlled to be rendered by the browser in different working modes.
The server is preset with a first registry, the first registry can be a script, after the first registry sent by the server is received, the script is automatically operated, the browser can be automatically configured by operating the script, and a compatible mode of the browser is automatically started.
In the embodiment of the invention, before one webpage needs to be opened each time, whether the working mode of the browser needs to be switched is judged, after the working mode of the browser is configured, the webpage to be rendered is rendered in the configured working mode, the configured working mode is more suitable for the webpage to be rendered, the webpage to be rendered is rendered in the configured working mode, and the rendering effect is better. The operation modes of the browser can be divided into a compatible mode and a non-compatible mode. The current version of the browser can be compatible with the lower version of the browser in a compatible mode, and the incompatible mode refers to a mode of the browser in the highest version.
For example, after a user logs in an HRP (Hospital Resource Planning ) system through a browser, needs to open a service page of the HRP system, and uses the service page as a webpage to be rendered, the service page needs to be opened in a compatible mode, after judging that the browser is not in the compatible mode, requests a first registry from a server, receives the first registry sent by the server and executes the first registry, switches the browser to the compatible mode by executing the first registry, and then renders the service page in the compatible mode.
In the embodiment of the invention, when the webpage to be rendered needs to start the compatible mode of the browser and the browser is not in the compatible mode, based on the condition, the browser is controlled to output a prompt whether to switch to the compatible mode, when the user confirms to switch to the compatible mode, a first registry is requested to the server, the first registry sent by the server is received, the browser is closed, the first registry is executed, the browser is restarted, the browser is switched to the compatible mode through the first registry, and the browser is controlled to render the webpage to be rendered in the compatible mode.
In addition to the above case that the web page to be rendered needs to open the compatible mode and the browser is not in the compatible mode, there are the following three cases:
case 1: the web page to be rendered does not need to have a compatible mode turned on and the browser is in a compatible mode.
In one embodiment of the present invention, the method further comprises:
b1: when judging that the webpage to be rendered does not need to open a compatible mode, judging whether the browser is in the compatible mode, if so, requesting a second registry for canceling the compatible mode from the server, and executing B2;
b2: and receiving the second registry transmitted by the server, executing the second registry, switching the browser to a non-compatible mode through the second registry, and controlling the browser to render the webpage to be rendered in the non-compatible mode.
In the embodiment of the invention, if the browser does not need to start the compatible mode, but the browser is already in the compatible mode, in this case, the compatible mode needs to be canceled, and the browser needs to be switched to the incompatible mode. In particular, this may be achieved by executing a second registry obtained from the server.
The second registry is preset in the server, and can be a script, after the second registry sent by the server is received, the script is automatically operated, the browser can be automatically configured by operating the script, the compatible mode of the browser is automatically canceled, the browser is switched to the incompatible mode, the whole process is automatically completed without manual participation, and the browser can be more conveniently controlled to render webpages in different working modes.
For example, after a user logs in the HRP system through a browser, the user needs to open a propaganda page, and uses the propaganda page as a page to be rendered, and since the propaganda page needs a better page effect, the propaganda page can be normally displayed only under a browser with a high version, and therefore the propaganda page does not need to open a compatible mode, needs to be opened under a non-compatible mode, determines that the browser is in the compatible mode, requests a second registry from a server, receives the second registry sent by the server and executes the second registry, cancels the compatible mode of the browser by executing the second registry, switches the browser to the non-compatible mode, and renders the page to be propaganda under the non-compatible mode.
Case 2: the web page to be rendered does not need to have a compatible mode turned on and the browser is not in a compatible mode.
In one embodiment of the present invention, the method further comprises:
and when judging that the webpage to be rendered does not need to be opened in the compatible mode and the browser is not in the compatible mode, controlling the browser to render the webpage to be rendered in the incompatible mode.
In case 2, the browser is already in the working mode required by the webpage to be rendered, and the working mode of the browser is not required to be switched, and only the browser is required to be controlled to be directly rendered.
For example, after a user logs in the HRP system through a browser, the user needs to open a propaganda page, and uses the propaganda page as a page to be rendered, and because the propaganda page needs a better page effect, the propaganda page can be normally displayed only under a browser with a high version, and therefore, the propaganda page does not need to be opened in a compatible mode, needs to be opened in a non-compatible mode, and does not need to switch the working mode of the browser after judging that the browser is not in the compatible mode, and the browser is directly controlled to render the propaganda page in the current non-compatible mode.
Case 3: the web page to be rendered needs to have a compatible mode turned on and the browser is in the compatible mode.
In one embodiment of the present invention, the method further comprises:
when judging that the webpage to be rendered needs to open the compatible mode of the browser and the browser is in the compatible mode, controlling the browser to render the webpage to be rendered in the compatible mode.
In case 3, the browser is already in the working mode required by the webpage to be rendered, and the working mode of the browser is not required to be switched, and only the browser is required to be controlled to be directly rendered.
For example, after a user logs in the HRP system through the browser, the user needs to open a service page, and uses the service page as a page to be rendered, the service page needs to be opened in a compatible mode, and after judging that the browser is in the compatible mode, the user does not need to switch the working mode of the browser, and only needs to directly control the browser to render the propaganda page in the compatible mode.
In one embodiment of the present invention, the method further comprises:
pre-storing the IP address of at least one webpage;
the step of judging whether the webpage to be rendered needs to start the compatible mode of the browser according to the IP address of the webpage to be rendered comprises the following steps:
judging whether the IP address of the webpage to be rendered is in the pre-stored IP address of the at least one webpage, if so, determining that the webpage to be rendered needs to be opened in a compatible mode, otherwise, determining that the webpage to be rendered does not need to be opened in the compatible mode.
Each web page corresponds to an IP address, which can be used as a unique identification of the web page. The IP address of at least one web page may be pre-saved, which is the IP address for which the compatibility mode needs to be opened. If the IP address of the webpage to be rendered is in the saved IP address, the webpage to be rendered is required to be opened in a compatible mode.
Of course, the IP address of at least one web page that does not require the compatibility mode to be opened may also be saved in advance. When the pre-stored IP address of at least one webpage is an IP address which does not need to start a compatible mode, if the IP address of the webpage to be rendered is in the stored IP address, the webpage to be rendered is indicated to not need to start the compatible mode, and if the IP address of the webpage to be rendered is not in the stored IP address, the webpage to be rendered is indicated to need to start the compatible mode. The concepts of these two implementations are consistent.
In an embodiment of the present invention, the obtaining the IP address of the webpage to be rendered of the browser includes:
intercepting an http request sent by the browser, and acquiring the IP address of the webpage to be rendered from the http request.
The http request sent by the browser carries the IP address of the webpage to be rendered, and the IP address of the webpage to be rendered can be obtained by intercepting the http request sent by the browser.
As shown in fig. 2, the method for controlling a browser to render a web page according to the embodiment of the present invention may specifically include the following steps:
step 201: and acquiring the IP address of the webpage to be rendered of the browser.
In particular, it may be obtained from an http request issued by a browser.
Step 202: according to the IP address of the webpage to be rendered, it is determined whether the webpage to be rendered needs to open a compatible mode of the browser, if so, step 203 is executed, otherwise, step 206 is executed.
Specifically, the IP address of at least one web page that needs to be opened in the compatible mode may be pre-stored, and as long as the web page to be rendered appears in the pre-stored IP address, it is determined that the web page to be rendered needs to be opened in the compatible mode.
In addition, the identification of the compatible mode can be set on the http request sent by the browser, when the webpage to be rendered needs to be opened, the identification of the compatible mode is carried in the http request corresponding to the webpage to be rendered, and when the webpage to be rendered does not need to be opened, the identification of the compatible mode is not carried in the http request corresponding to the webpage to be rendered.
Step 203: whether the browser is in the compatible mode is judged, if so, step 204 is executed, otherwise, step 205 is executed.
Specifically, the operation mode of the browser can be directly obtained from the configuration information of the browser.
Step 204: and controlling the browser to render the webpage to be rendered in a compatible mode.
Specifically, empty content is returned to the browser without modification to the browser.
Step 205: requesting a first registry for starting a compatible mode from a server, receiving the first registry sent by the server, executing the first registry, switching the browser to the compatible mode through the first registry, and controlling the browser to render the webpage to be rendered in the compatible mode.
Specifically, after the first registry is executed, the IP address of the webpage to be rendered is automatically added to the website of the browser running in the compatibility view, and the webpage to be rendered is used as a website running in the compatibility view.
Step 206: it is determined whether the browser is in a compatible mode, if so, step 207 is performed, otherwise, step 208 is performed.
Step 207: and requesting a second registry for canceling the compatible mode from the server, receiving the second registry sent by the server, executing the second registry, switching the browser to the incompatible mode through the second registry, and controlling the browser to render the webpage to be rendered in the incompatible mode.
Specifically, after executing the second registry, the IP address of the web page to be rendered is automatically removed from the web site of the browser running in the compatibility view.
Step 208: and controlling the browser to render the webpage to be rendered in the incompatible mode.
Specifically, empty content is returned to the browser without modification to the browser.
The browser in the embodiment of the invention may be an IE browser.
In the embodiment of the invention, the setting compatible mode of the dead-reckoning can be realized aiming at different IP addresses.
As shown in fig. 3, an embodiment of the present invention provides an apparatus for controlling a browser to render a web page, including:
an obtaining unit 301, configured to obtain an IP address of a webpage to be rendered of the browser;
a judging unit 302 for executing:
s1: judging whether the webpage to be rendered needs to start a compatible mode of the browser or not according to the IP address of the webpage to be rendered, and executing S2 if the webpage to be rendered needs to start the compatible mode of the browser;
s2: judging whether the browser is in a compatible mode, if not, requesting a first registry for starting the compatible mode from a server, and triggering a first control unit;
the first control unit 303 is configured to receive the first registry sent by the server, execute the first registry, switch the browser to a compatible mode through the first registry, and control the browser to render the webpage to be rendered in the compatible mode.
In an embodiment of the present invention, the judging unit is further configured to, when judging that the webpage to be rendered does not need to open a compatible mode, judge whether the browser is in the compatible mode, if so, request a second registry for canceling the compatible mode to the server, and trigger the second control unit;
the second control unit is further configured to receive the second registry sent by the server, execute the second registry, switch the browser to a non-compatible mode through the second registry, and control the browser to render the webpage to be rendered in the non-compatible mode.
In one embodiment of the present invention, the apparatus further comprises:
a storage unit for storing the IP address of at least one web page;
the judging unit is configured to judge whether the IP address of the webpage to be rendered is in the pre-saved IP address of the at least one webpage, if so, determine that the webpage to be rendered needs to open a compatible mode, or, if not, determine that the webpage to be rendered does not need to open the compatible mode.
In an embodiment of the present invention, the obtaining unit is configured to intercept an http request sent by the browser, and obtain an IP address of the webpage to be rendered from the http request.
In one embodiment of the present invention, the apparatus further comprises:
and the third control unit is used for controlling the browser to render the webpage to be rendered in the non-compatible mode when judging that the webpage to be rendered does not need to open the compatible mode and the browser is not in the compatible mode.
In one embodiment of the present invention, the apparatus further comprises:
and the fourth control unit is used for controlling the browser to render the webpage to be rendered in the compatible mode when judging that the webpage to be rendered needs to open the compatible mode of the browser and the browser is in the compatible mode.
It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the apparatus for controlling the browser to render the web page. In other embodiments of the invention, the means for controlling the browser to render the web page may include more or less components than illustrated, or may combine certain components, or may split certain components, or may have a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The content of information interaction and execution process between the units in the device is based on the same conception as the embodiment of the method of the present invention, and specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
The present invention also provides a computer readable medium storing instructions for causing a computer to perform a method of controlling a browser to render a web page as described herein. Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present invention.
Examples of the storage medium for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer by a communication network.
Further, it should be apparent that the functions of any of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform part or all of the actual operations based on the instructions of the program code.
Further, it is understood that the program code read out by the storage medium is written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion unit connected to the computer, and then a CPU or the like mounted on the expansion board or the expansion unit is caused to perform part and all of actual operations based on instructions of the program code, thereby realizing the functions of any of the above embodiments.
It should be noted that not all the steps and modules in the above flowcharts and the system configuration diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented jointly by some components in multiple independent devices.
In the above embodiments, the hardware unit may be mechanically or electrically implemented. For example, a hardware unit may include permanently dedicated circuitry or logic (e.g., a dedicated processor, FPGA, or ASIC) to perform the corresponding operations. The hardware unit may also include programmable logic or circuitry (e.g., a general-purpose processor or other programmable processor) that may be temporarily configured by software to perform the corresponding operations. The particular implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been illustrated and described in detail in the drawings and in the preferred embodiments, the invention is not limited to the disclosed embodiments, and it will be appreciated by those skilled in the art that the code audits of the various embodiments described above may be combined to produce further embodiments of the invention, which are also within the scope of the invention.

Claims (8)

1. A method for controlling a browser to render a web page, comprising:
a1: acquiring an IP address of a webpage to be rendered of a browser;
a2: judging whether the webpage to be rendered needs to start a compatible mode of the browser or not according to the IP address of the webpage to be rendered, and if so, executing A3;
a3: acquiring a working mode of a browser from configuration information of the browser, judging whether the browser is in a compatible mode, if not, requesting a first registry for starting the compatible mode from a server, and executing A4;
a4: receiving the first registry transmitted by the server, executing the first registry, switching the browser to a compatible mode through the first registry, and controlling the browser to render the webpage to be rendered in the compatible mode;
further comprises: pre-storing the IP address of at least one webpage;
when the stored IP address is an IP address that needs to open a compatible mode, the determining, according to the IP address of the webpage to be rendered, whether the webpage to be rendered needs to open the compatible mode of the browser includes: judging whether the IP address of the webpage to be rendered is in the pre-stored IP address of the at least one webpage, if so, determining that the webpage to be rendered needs to be opened in a compatible mode, otherwise, determining that the webpage to be rendered does not need to be opened in the compatible mode;
when the stored IP address is an IP address that does not need to open a compatible mode, the determining, according to the IP address of the webpage to be rendered, whether the webpage to be rendered needs to open the compatible mode of the browser includes: judging whether the IP address of the webpage to be rendered is in the pre-stored IP address of the at least one webpage, if so, determining that the webpage to be rendered does not need to be opened in a compatible mode, otherwise, determining that the webpage to be rendered needs to be opened in the compatible mode.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
further comprises:
b1: when judging that the webpage to be rendered does not need to open a compatible mode, judging whether the browser is in the compatible mode, if so, requesting a second registry for canceling the compatible mode from the server, and executing B2;
b2: and receiving the second registry transmitted by the server, executing the second registry, switching the browser to a non-compatible mode through the second registry, and controlling the browser to render the webpage to be rendered in the non-compatible mode.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the obtaining the IP address of the webpage to be rendered of the browser includes:
intercepting an http request sent by the browser, and acquiring the IP address of the webpage to be rendered from the http request.
4. A method according to any one of claims 1 to 3, wherein,
further comprises:
when judging that the webpage to be rendered does not need to be opened in a compatible mode, and the browser is not in the compatible mode, controlling the browser to render the webpage to be rendered in a non-compatible mode;
and/or the number of the groups of groups,
further comprises:
when judging that the webpage to be rendered needs to open the compatible mode of the browser and the browser is in the compatible mode, controlling the browser to render the webpage to be rendered in the compatible mode.
5. An apparatus for controlling a browser to render a web page, comprising:
the acquisition unit is used for acquiring the IP address of the webpage to be rendered of the browser;
a judging unit configured to perform:
s1: judging whether the webpage to be rendered needs to start a compatible mode of the browser or not according to the IP address of the webpage to be rendered, and executing S2 if the webpage to be rendered needs to start the compatible mode of the browser;
s2: acquiring a working mode of a browser from configuration information of the browser, judging whether the browser is in a compatible mode, if not, requesting a first registry for starting the compatible mode from a server, and triggering a first control unit;
the first control unit is configured to receive the first registry sent by the server, execute the first registry, switch the browser to a compatible mode through the first registry, and control the browser to render the webpage to be rendered in the compatible mode;
further comprises:
a storage unit for storing the IP address of at least one web page;
when the stored IP address is an IP address of which the compatible mode needs to be started, the judging unit is used for judging whether the IP address of the webpage to be rendered is in the pre-stored IP address of the at least one webpage, if so, determining that the webpage to be rendered needs to be started in the compatible mode, otherwise, determining that the webpage to be rendered does not need to be started in the compatible mode;
when the stored IP address is an IP address that does not need to open a compatible mode, the determining, according to the IP address of the webpage to be rendered, whether the webpage to be rendered needs to open the compatible mode of the browser includes: judging whether the IP address of the webpage to be rendered is in the pre-stored IP address of the at least one webpage, if so, determining that the webpage to be rendered does not need to be opened in a compatible mode, otherwise, determining that the webpage to be rendered needs to be opened in the compatible mode.
6. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the judging unit is further used for judging whether the browser is in a compatible mode or not when judging that the webpage to be rendered does not need to open the compatible mode, if so, requesting a second registry for canceling the compatible mode from the server, and triggering a second control unit;
the second control unit is further configured to receive the second registry sent by the server, execute the second registry, switch the browser to a non-compatible mode through the second registry, and control the browser to render the webpage to be rendered in the non-compatible mode.
7. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the obtaining unit is used for intercepting an http request sent by the browser and obtaining the IP address of the webpage to be rendered from the http request.
8. The apparatus according to any one of claims 5 to 7, wherein,
further comprises:
the third control unit is used for controlling the browser to render the webpage to be rendered in a non-compatible mode when judging that the webpage to be rendered does not need to open a compatible mode and the browser is not in the compatible mode;
and/or the number of the groups of groups,
further comprises:
and the fourth control unit is used for controlling the browser to render the webpage to be rendered in the compatible mode when judging that the webpage to be rendered needs to open the compatible mode of the browser and the browser is in the compatible mode.
CN201911342323.8A 2019-12-23 2019-12-23 Method and device for controlling browser to render webpage Active CN111177606B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911342323.8A CN111177606B (en) 2019-12-23 2019-12-23 Method and device for controlling browser to render webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911342323.8A CN111177606B (en) 2019-12-23 2019-12-23 Method and device for controlling browser to render webpage

Publications (2)

Publication Number Publication Date
CN111177606A CN111177606A (en) 2020-05-19
CN111177606B true CN111177606B (en) 2023-12-15

Family

ID=70646301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911342323.8A Active CN111177606B (en) 2019-12-23 2019-12-23 Method and device for controlling browser to render webpage

Country Status (1)

Country Link
CN (1) CN111177606B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461120B1 (en) * 2002-07-09 2008-12-02 Vignette Corporation Method and system for identifying a visitor at a website server by requesting additional characteristic of a visitor computer from a visitor server
CN102467515A (en) * 2010-10-28 2012-05-23 亚太戏网股份有限公司 System for generating webpage totem through totem server
CN104346403A (en) * 2013-08-07 2015-02-11 腾讯科技(深圳)有限公司 Browser page display method and device as well as browser and terminal
CN104850602A (en) * 2015-05-04 2015-08-19 微梦创科网络科技(中国)有限公司 Method and apparatus for rendering and refreshing based on Internet webpage
US9262396B1 (en) * 2010-03-26 2016-02-16 Amazon Technologies, Inc. Browser compatibility checker tool
WO2016131311A1 (en) * 2015-07-16 2016-08-25 中兴通讯股份有限公司 Browser compatibility method and browser
CN106462561A (en) * 2014-06-26 2017-02-22 谷歌公司 Optimized browser render process
CN109144567A (en) * 2018-08-03 2019-01-04 苏州麦迪斯顿医疗科技股份有限公司 Cross-platform webpage rendering method, device, server and storage medium
CN110516179A (en) * 2019-08-07 2019-11-29 Oppo广东移动通信有限公司 Method for rendering graph, device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180137546A1 (en) * 2016-11-15 2018-05-17 Social Networking Technology, Inc. Systems and methods for delivering advertisements

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461120B1 (en) * 2002-07-09 2008-12-02 Vignette Corporation Method and system for identifying a visitor at a website server by requesting additional characteristic of a visitor computer from a visitor server
US9262396B1 (en) * 2010-03-26 2016-02-16 Amazon Technologies, Inc. Browser compatibility checker tool
CN102467515A (en) * 2010-10-28 2012-05-23 亚太戏网股份有限公司 System for generating webpage totem through totem server
CN104346403A (en) * 2013-08-07 2015-02-11 腾讯科技(深圳)有限公司 Browser page display method and device as well as browser and terminal
CN106462561A (en) * 2014-06-26 2017-02-22 谷歌公司 Optimized browser render process
CN104850602A (en) * 2015-05-04 2015-08-19 微梦创科网络科技(中国)有限公司 Method and apparatus for rendering and refreshing based on Internet webpage
WO2016131311A1 (en) * 2015-07-16 2016-08-25 中兴通讯股份有限公司 Browser compatibility method and browser
CN109144567A (en) * 2018-08-03 2019-01-04 苏州麦迪斯顿医疗科技股份有限公司 Cross-platform webpage rendering method, device, server and storage medium
CN110516179A (en) * 2019-08-07 2019-11-29 Oppo广东移动通信有限公司 Method for rendering graph, device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Comparing the Built-In Application Architecture Models in the Web Browser;Antero Taivalsaari 等;《2017 IEEE International Conference on Software Architecture》;第51-54页 *
基于WebKit浏览器WebGL的并行化图形渲染研究;向俊;《万方学术》;第2-4章 *
网页浏览感知提升技术研究;程卫华;《电信科学》(第Z2期);第146-156页 *

Also Published As

Publication number Publication date
CN111177606A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
US20210112402A1 (en) Method enabling migration of a subscription
US10871953B2 (en) Application update method and apparatus
CN107920112B (en) Configuration file pushing method supporting gray mode, central server and storage medium
CN109462601B (en) Multi-platform access method and device based on eSIM
CN108039969B (en) Network automatic configuration method, device, system, storage medium and target computer
CN111240653B (en) Interface document generation method, device and readable storage medium
CN104378345B (en) The safety detection method of mobile client URL and system
EP3169113A1 (en) Network access method and mobile communications terminal
US20170005858A1 (en) Log processing method and client
CN106201850B (en) A kind of compatibility test method and device
CN110990733B (en) Page loading method and device, electronic equipment and medium
CN112363767A (en) Vehicle-mounted camera calling method and device
EP3169107A1 (en) Network access method and mobile communications terminal
CN112187934A (en) Micro-service building method
CN107979627B (en) Network request processing method and device
CN111177606B (en) Method and device for controlling browser to render webpage
CN109951549B (en) Network page access method and device and computer readable storage medium
JP6877388B2 (en) Information processing equipment, mobiles, information processing methods, and programs
CN114553477B (en) Page jump method, device, equipment and storage medium
CN111930626B (en) Automatic testing method and device based on PaaS cloud service
CN111813504B (en) Method and device for automatically configuring effective virtual machine and electronic equipment
CN112104513B (en) Visual software load method, device, equipment and storage medium
US20200311169A1 (en) Apparatus and method for determining types of uniform resource locator
CN113867821A (en) PXE boot configuration method, device, equipment and medium for specified network port
CN112328288A (en) Method, system, equipment and storage medium for updating server component

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100176 room 801-2, 8th floor, building 3, yard 22, Ronghua Middle Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Wanghai Kangxin (Beijing) Technology Co.,Ltd.

Address before: Room 07, zone 2, building B, No. 12, Hongda North Road, Beijing Economic and Technological Development Zone, Beijing 100176

Applicant before: Wanghai Kangxin (Beijing) Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant