CN103955477A - Method for writing and reading Cookie information in browser, device and browser - Google Patents

Method for writing and reading Cookie information in browser, device and browser Download PDF

Info

Publication number
CN103955477A
CN103955477A CN201410127505.4A CN201410127505A CN103955477A CN 103955477 A CN103955477 A CN 103955477A CN 201410127505 A CN201410127505 A CN 201410127505A CN 103955477 A CN103955477 A CN 103955477A
Authority
CN
China
Prior art keywords
website
browser
cookie data
kernel
browser kernel
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.)
Pending
Application number
CN201410127505.4A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410127505.4A priority Critical patent/CN103955477A/en
Publication of CN103955477A publication Critical patent/CN103955477A/en
Pending legal-status Critical Current

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/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 embodiment of the invention provides a method for writing and reading Cookie information in a browser, a device and the browser. The method for writing and reading the Cookie information in the browser comprises the following steps: intercepting a writing operation for a Cookie data of a first website on a kernel side of a first browser; acquiring URL information of the first website and a pre-written stored Cookie data and transmitting the acquired URL information of the first website and the pre-written stored Cookie data to the kernel side of a second browser; storing the URL of the website and the corresponding pre-written stored Cookie data on the kernel side of the second browser. According to the embodiment of the invention, the synchronization of the writing operations for the Cookie data between different browser kernels in one browser is realized and the writing operation efficiency for the Cookie data is increased.

Description

The method of write-read cookie information, device and browser in browser
Technical field
The present invention relates to the technical field of browser, particularly relate to a kind of method of cookie information, a kind of method of cookie information, a kind of device of cookie information, a kind of device and a kind of browser of reading cookie information in browser write read write in browser in browser in browser.
Background technology
Browser can be divided into two parts, i.e. kernel and shell from framework.Browser kernel refers to the core of browser, can be divided into two parts: render engine (layout engineer or Rendering Engine) and JS(JavaScript) engine.Content (comprising HTML, XML, image etc.), organize your messages that render engine is mainly responsible for obtaining webpage (as add CSS(Cascading Style Sheets, CSS (cascading style sheet) list) etc.), and the display mode of calculating webpage, then can export display or printer to.The difference of browser kernel has difference for the grammar explanation of webpage, so the effect of playing up is not identical yet.All web browsers, email client and other need the application program of editor, display network content all to need kernel.JS engine is to resolve Javascript language, and the dynamic effect of webpage realized in execution Javascript language.
Because the webpages such as a large amount of Web banks, government website are only supported IE browser, and IE browser is because speed is slow, the reasons such as the support of web standards is poor are endured to the fullest extent denounced, so each manufacturer has released double-core browser successively, the instant browser that uses two browser kernels, its purpose of design is to promote when can correctly showing particular webpage surfing and security.
In browser, cookie information refers to that website is stored in the data in subscriber's local terminal (Client Side) in order to distinguish user identity, a kind of hard disk or internal memory that can allow Website server data storing be arrived to user side, and from the technology of the computer reading out data of user side, each Website server can only be stored the to one's name cookie information of domain name on the computer of user side, and the Website server that this cookie information can only be pointed to by this domain name reads by browser.
Along with the fast development of network technology, increasing people starts by browser receiving and dispatching mail, login personal space, plays online game, login forum and microblogging etc.For the ease of user's login, reduce the troublesome operation that each login all needs to input account and password, in Internet protocol RFC2109, specify the use of corresponding cookie information in browser.
But different browsers kernel has a set of management cookie method of oneself, the cookie information writing for one of them browser kernel, another browser kernel cannot read.User, in the time using double-core browser browsing device net page, often occurs under the page of different browsers kernel of same website, plays up to show inconsistently, and user experiences very poor.And user need to not write under the browser kernel of cookie information at another, Website login again, operation is trouble very, repeat logon, repeats to generate cookie information, has increased the resource cost of client and server.
Summary of the invention
In view of the above problems, the present invention has been proposed to a kind of a kind of method of cookie information, a kind of method and the corresponding a kind of device of cookie information, a kind of device and a kind of browser of writing cookie information in browser write of reading cookie information in browser write that overcomes the problems referred to above or address the above problem is at least in part provided in browser in browser.
According to one aspect of the present invention, a kind of method of writing cookie information in browser is provided, comprising:
Intercept the write operation of the Cookie data to the first website in the first browser kernel side;
Obtain the URL information and the Cookie data that prewrite preservation of the first website, and by the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve URL and the corresponding Cookie data that prewrite preservation of described website in the second browser kernel side.
Alternatively, also comprise:
Forbid preserving URL and the corresponding Cookie data that prewrite preservation of described website in the first browser kernel side.
Alternatively, described the first browser kernel comprises Trident kernel, and described the second browser kernel comprises non-Trident kernel.
Alternatively, described the first browser kernel comprises non-Trident kernel, and described the second browser kernel comprises Trident kernel.
Alternatively, described non-Trident kernel comprises Webkit kernel.
Alternatively, described the first browser kernel side is write functional sequence by least one following Cookie data Coookie data is carried out to write operation:
InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function.
Alternatively, described the first browser kernel side is carried out write operation by WebKit::WebCookieJar::setCookie function to Coookie data.
Alternatively, described the URL information of the first obtained website and the step of Cookie data transmission to the second browser kernel side that prewrites preservation are comprised:
Send Cookie data write information to the second browser kernel side by interprocess communication IPC; Described Cookie data write information comprises the URL information of the first obtained website and prewrites the Cookie data of preservation.
Alternatively, described Cookie data comprise Cookie data name and corresponding value.
According to a further aspect in the invention, provide a kind of method of reading cookie information in browser, having comprised:
Intercept the read operation of the Cookie data to the first website in the first browser kernel side;
Obtain the URL information of the first website, and by URL communication to the second browser kernel side of the first obtained website;
Receive that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
Alternatively, also comprise:
Use website described in described Cookie data entry.
Alternatively, described the first browser kernel comprises Trident kernel, and described the second browser kernel comprises non-Trident kernel.
Alternatively, described the first browser kernel comprises non-Trident kernel, and described the second browser kernel comprises Trident kernel.
Alternatively, described non-Trident kernel comprises Webkit kernel.
Alternatively, described the first browser kernel side is carried out read operation by InternetGetCookieExA function and/or InternetGetCookieExW function to the Cookie data of the first website.
Alternatively, described the second browser kernel side is carried out read operation by WebKit::WebCookieJar::cookies function to the Cookie data of the first website.
Alternatively, described URL information comprises URL and Cookie data name, described in obtain the URL information of the first website step comprise:
Obtain URL and the corresponding Cookie data name of the first website.
Alternatively, the described step by URL communication to the second browser kernel side of the first website obtaining comprises:
By interprocess communication IPC, the URL of the first obtained website and corresponding Cookie data name are transferred to the second browser kernel side.
Alternatively, described reception the second browser kernel side is returned, and the step of cookie information corresponding to the described website of reading according to the URL information of described the first website comprises:
Receive by interprocess communication IPC the Cookie data read message that the second browser kernel side is returned; Wherein, described Cookie data read message comprises according to value corresponding in the URL of described the first website and the Cookie data of described the first website that Cookie data name reads.
According to a further aspect in the invention, provide a kind of device of writing cookie information in browser, having comprised:
The first blocking module, is suitable for intercepting in the first browser kernel side the write operation of the Cookie data to the first website;
The first acquisition module, the Cookie data that are suitable for obtaining the URL information of the first website and prewrite preservation;
The first transport module, is suitable for the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve module, be suitable for preserving in the second browser kernel side URL and the corresponding Cookie data that prewrite preservation of described website.
Alternatively, also comprise:
Disabled module, is suitable for forbidding preserving the URL of described website and the Cookie data that prewrite preservation of correspondence in the first browser kernel side.
Alternatively, described the first browser kernel comprises Trident kernel, and described the second browser kernel comprises non-Trident kernel.
Alternatively, described the first browser kernel comprises non-Trident kernel, and described the second browser kernel comprises Trident kernel.
Alternatively, described non-Trident kernel comprises Webkit kernel.
Alternatively, described the first browser kernel side is write functional sequence by least one following Cookie data Coookie data is carried out to write operation:
InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function.
Alternatively, described the first browser kernel side is carried out write operation by WebKit::WebCookieJar::setCookie function to Coookie data.
Alternatively, described the first transport module is also suitable for:
Send Cookie data write information to the second browser kernel side by interprocess communication IPC; Described Cookie data write information comprises the URL information of the first obtained website and prewrites the Cookie data of preservation.
Alternatively, described Cookie data comprise Cookie data name and corresponding value.
According to a further aspect in the invention, provide a kind of device of reading cookie information in browser, having comprised:
The second blocking module, is suitable for intercepting in the first browser kernel side the read operation of the Cookie data to the first website;
The second acquisition module, is suitable for obtaining the URL information of the first website;
The second transport module, is suitable for URL communication to the second browser kernel side of the first obtained website;
Receiver module, is suitable for receiving that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
Alternatively, also comprise:
Login module, is suitable for using website described in described Cookie data entry.
Alternatively, described the first browser kernel comprises Trident kernel, and described the second browser kernel comprises non-Trident kernel.
Alternatively, described the first browser kernel comprises non-Trident kernel, and described the second browser kernel comprises Trident kernel.
Alternatively, described non-Trident kernel comprises Webkit kernel.
Alternatively, described the first browser kernel side is carried out read operation by InternetGetCookieExA function and/or InternetGetCookieExW function to the Cookie data of the first website.
Alternatively, described the first browser kernel side is carried out read operation by WebKit::WebCookieJar::cookies function to the Cookie data of the first website.
Alternatively, described URL information comprises URL and Cookie data name, and described the second acquisition module is also suitable for:
Obtain URL and the corresponding Cookie data name of the first website.
Alternatively, described the second transport module is also suitable for:
By interprocess communication IPC, the URL of the first obtained website and corresponding Cookie data name are transferred to the second browser kernel side.
Alternatively, described receiver module is also suitable for:
Receive by interprocess communication IPC the Cookie data read message that the second browser kernel side is returned; Wherein, described Cookie data read message comprises according to value corresponding in the URL of described the first website and the Cookie data of described the first website that Cookie data name reads.
According to a further aspect in the invention, provide a kind of browser, having comprised:
The first blocking module, is suitable for intercepting in the first browser kernel side the write operation of the Cookie data to the first website;
The first acquisition module, the Cookie data that are suitable for obtaining the URL information of the first website and prewrite preservation;
The first transport module, is suitable for the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve module, be suitable for preserving in the second browser kernel side URL and the corresponding Cookie data that prewrite preservation of described website.
According to a further aspect in the invention, provide a kind of browser, having comprised:
The second blocking module, is suitable for intercepting in the first browser kernel side the read operation of the Cookie data to the first website;
The second acquisition module, is suitable for obtaining the URL information of the first website;
The second transport module, is suitable for URL communication to the second browser kernel side of the first obtained website;
Receiver module, is suitable for receiving that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
The embodiment of the present invention is intercepted the write operation of the Cookie data to the first website in the first browser kernel side, to obtain the URL information and the Cookie data that prewrite preservation of the first website, and the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation are preserved, the write operation of Cookie data in the first browser kernel is synchronized in the second browser kernel, realize in a browser the synchronous of the write operation of Cookie data between different browsers kernel, improve the write operation efficiency of Cookie data.
The embodiment of the present invention is forbidden URL and the corresponding Cookie data that prewrite preservation of the first browser kernel side preservation website, avoid in browser different browsers kernel to have the way to manage of different Cookie data, further improved the write operation efficiency of Cookie data.
The embodiment of the present invention is being intercepted the read operation of the Cookie data to the first website in the first browser kernel side, to obtain the URL information of the first website, and by URL communication to the second browser kernel side of the first obtained website, to read Cookie data, return to again the first browser kernel, realize in a browser the synchronous of Cookie data reading operation between different browsers kernel, improved the read operation efficiency of Cookie data.
The Cookie data that the embodiment of the present invention reads the second browser kernel preservation at the first browser kernel are carried out the login of website, solve the inconsistent problem of different browsers kernel Cookie data management mode in same browser, can make to obtain unified rendering effect in different browsers kernel, reduce the operation of user's repeat logon, avoid the repeat logon operation of browser, also avoided the operation of Website server duplicate answer, reduce the system resources consumption of browser and Website server, and reduce taking of the network bandwidth, can promote user experiences.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to better understand technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Brief description of the drawings
By reading below detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skill in the art.Accompanying drawing is only for the object of preferred implementation is shown, and do not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows a kind of according to an embodiment of the invention flow chart of steps of the embodiment of the method for writing cookie information in browser;
Fig. 2 shows the exemplary plot of Cookie data in a kind of according to an embodiment of the invention WebKit kernel;
Fig. 3 shows a kind of according to an embodiment of the invention flow chart of steps of the embodiment of the method for reading cookie information in browser;
Fig. 4 shows the structured flowchart of a kind of according to an embodiment of the invention device embodiment that writes cookie information in browser;
Fig. 5 shows the structured flowchart of a kind of according to an embodiment of the invention device embodiment that reads cookie information in browser;
Fig. 6 shows the structured flowchart of a kind of according to an embodiment of the invention browser embodiment 1; And
Fig. 7 shows the structured flowchart of a kind of according to an embodiment of the invention browser embodiment 2.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in accompanying drawing, but should be appreciated that and can realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order more thoroughly to understand the disclosure that these embodiment are provided, and can be by the those skilled in the art that conveys to complete the scope of the present disclosure.
With reference to Fig. 1, show a kind of according to an embodiment of the invention flow chart of steps of the embodiment of the method for writing cookie information in browser, can comprise the steps:
Step 101, intercepts the write operation of the Cookie data to the first website in the first browser kernel side;
User for example, first in the time that the first browser kernel side adopts accounts information (account name and account password) Website login and logins successfully, the Cookie data of the account can be returned in website, are configured to automatically preserve the write operation that can trigger the Cookie data of the first browser kernel side to the first website in the situations such as Cookie data at browser.
It should be noted that, the browser in the embodiment of the present invention can comprise two or more browser kernels.
In a preferred embodiment of the present invention, described the first browser kernel can comprise Trident kernel, and accordingly, described the second browser kernel can comprise non-Trident kernel.
In another kind of preferred embodiment of the present invention, described the first browser kernel comprises non-Trident kernel, and accordingly, described the second browser kernel can comprise Trident kernel.
Wherein, described non-Trident kernel can comprise the browser kernel of the contour performance of Webkit kernel, and certainly, the embodiment of the present invention can also arrange other non-Trident kernels according to actual conditions, for example Gecko kernel, Presto kernel etc., the embodiment of the present invention is not limited this.
In the time that the first browser kernel is Trident kernel, described the first browser kernel side can be write functional sequence by least one following Cookie data Coookie data are carried out to write operation:
InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function.
Wherein, InternetSetCookieA function and InternetSetCookieExA function are corresponding to ANSI(character code) narrow character, a character is represented by 1 byte.
InternetSetCookieW function, InternetSetCookieExW function are corresponding to UNICODE(Unicode, ten thousand country codes, single code) wide character, a character is represented by 2 bytes.
The usage example of InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function can be as follows:
BOOL?InternetSetCookieA(
LPCSTR lpszUrl, the abbreviation of the URL(Uniform/Universal Resource Locator of // webpage, URL(uniform resource locator))
LPCSTR lpszCookieName, //Cookie data name
LPCSTR lpszCookieData//Cookie data
);
BOOL?InternetSetCookieW(
LPCWSTR lpszUrl, the URL of // webpage
LPCWSTR lpszCookieName, //Cookie data name
LPCWSTR lpszCookieData//Cookie data
);
DWORD?InternetSetCookieExA(
LPCSTR lpszURL, the URL of // webpage
LPCSTR lpszCookieName, //Cookie data name
LPCSTR lpszCookieData, //Cookie data
DWORD dwFlags, the usage flag of //Cookie data
DWORD_PTR dwReserved//retention parameter
);
DWORD?InternetSetCookieExW(
LPCWSTR lpszURL, the URL of // webpage
LPCWSTR lpszCookieName, //Cookie data name
LPCWSTR lpszCookieData, //Cookie data
DWORD dwFlags, the usage flag of //Cookie data
DWORD_PTR dwReserved//retention parameter
It should be noted that, Trident kernel is in the time writing Cookie data, can adopt the one or more write operations that carry out in InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function and InternetSetCookieExA function according to the actual conditions of webpage, therefore, the embodiment of the present invention can be tackled one or more in InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function and InternetSetCookieExA function according to actual conditions.
In a kind of preferred exemplary of the embodiment of the present invention, can adopt Detours Hook(hook) tackle, realize the adapter of InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function.
Wherein, Detours is a development library, can realize API(Application Program Interface, application programming interfaces) function of HOOK.
In the time that the first browser kernel is WebKit kernel, described the first browser kernel side can be carried out write operation to Coookie data by WebKit::WebCookieJar::setCookie function.
The usage example of WebKit::WebCookieJar::setCookie function can be as follows:
void?WebKit::WebCookieJar::setCookie(
Const WebKit::WebURL & url, // URL corresponding to cookie data write
Const WebKit::WebURL & first_party_for_cookies, // as the URL of front opening webpage
Const WebKit::WebString & value); //Cookie data
Step 102, obtains the URL information and the Cookie data that prewrite preservation of the first website;
In the time that the first browser kernel is Trident kernel, in InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function, can read lpszUrl parameter, obtain the URL of the first website, can read lpszCookieData parameter, obtain the Cookie data that prewrite preservation.
In the time that the first browser kernel is WebKit, in WebKit::WebCookieJar::setCookie function, can read WebKit::WebURL & url parameter, obtain the URL of the first website, can read WebKit::WebString & value parameter, obtain the Cookie data that prewrite preservation.
Step 103, by the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
In a preferred embodiment of the present invention, step 103 can comprise following sub-step:
Sub-step S11, sends Cookie data write information to the second browser kernel side by interprocess communication IPC; Described Cookie data write information comprises the URL information of the first obtained website and prewrites the Cookie data of preservation.
IPC(Inter-Process Communication, interprocess communication), be a kind of mechanism of interprocess communication, the first browser kernel and the second browser kernel can pass through IPC swap data and message.
In a kind of preferred exemplary of the embodiment of the present invention, Cookie data write information can be for passing through Send(new ViewHostMsg_SetCookie(MSG_ROUTING_NONE, url, url, request_cookie, cookie) information that) interface sends can comprise the URL information of the first obtained website and prewrite the Cookie data of preservation in this information, carries out the write operation of Cookie data to realize the second browser kernel side.
Step 104, preserves the URL of described website and the Cookie data that prewrite preservation of correspondence in the second browser kernel side.
Described Cookie data can comprise Cookie data name and corresponding value, and the second browser kernel side can adopt Cookie data name and corresponding value to carry out the write operation of Cookie data according to arranging of self.
Taking the second browser as WebKit kernel is as example, the Cookie data of WebKit kernel are to adopt sqlite database to be kept in Cookie file, its form as shown in Figure 2, WebKit kernel is in the time carrying out the write operation of Cookie data, can in host_key column, write the URL of the first website, in name column, write Cookie data name, in value column, write the value that Cookie data name is corresponding.
The embodiment of the present invention is intercepted the write operation of the Cookie data to the first website in the first browser kernel side, to obtain the URL information and the Cookie data that prewrite preservation of the first website, and the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation are preserved, the write operation of Cookie data in the first browser kernel is synchronized in the second browser kernel, realize in a browser the synchronous of the write operation of Cookie data between different browsers kernel, improve the write operation efficiency of Cookie data.
In a preferred embodiment of the present invention, can also comprise the steps:
Step 105, forbids preserving the URL of described website and the Cookie data that prewrite preservation of correspondence in the first browser kernel side.
In specific implementation, can return and forbid writing Cookie data message to the first browser kernel side, for example, " COOKIE_STATE_ACCEPT ", in the time that the first browser kernel receives this and forbids writing Cookie data message, do not carry out the write operation of these Coookie data.
The embodiment of the present invention is forbidden URL and the corresponding Cookie data that prewrite preservation of the first browser kernel side preservation website, avoid in browser different browsers kernel to have the way to manage of different Cookie data, further improved the write operation efficiency of Cookie data.
With reference to Fig. 3, show a kind of according to an embodiment of the invention flow chart of steps of the embodiment of the method for reading cookie information in browser, can comprise the steps:
Step 301, intercepts the read operation of the Cookie data to the first website in the first browser kernel side;
User non-first (for Cookie data, in the effective situation of Cookie data, logging in can be for first non-) during at the first browser kernel side Website login, can trigger the read operation of the Cookie data of the first browser kernel side to the first website.
It should be noted that, the browser in the embodiment of the present invention can comprise two or more browser kernels.
In a preferred embodiment of the present invention, described the first browser kernel can comprise Trident kernel, and accordingly, described the second browser kernel can comprise non-Trident kernel.
In another kind of preferred embodiment of the present invention, described the first browser kernel comprises non-Trident kernel, and accordingly, described the second browser kernel can comprise Trident kernel.
Wherein, described non-Trident kernel can comprise the browser kernel of the contour performance of Webkit kernel, and certainly, the embodiment of the present invention can also arrange other non-Trident kernels according to actual conditions, for example Gecko kernel, Presto kernel etc., the embodiment of the present invention is not limited this.
In the time that the first browser kernel is Trident kernel, described the first browser kernel side can be carried out read operation to the Cookie data of the first website by InternetGetCookieExA function and/or InternetGetCookieExW function.
Wherein, InternetGetCookieExA function is corresponding to ANSI(character code) narrow character, a character is represented by 1 byte.
InternetGetCookieExW is corresponding to UNICODE(Unicode, ten thousand country codes, single code) wide character, a character is represented by 2 bytes.
The usage example of InternetGetCookieExA function, InternetGetCookieExW function can be as follows:
BOOL?InternetGetCookieExA(
LPCSTR lpszURL, // URL corresponding to Cookie data that read
LPCSTR lpszCookieName, //Cookie data name
LPSTR lpszCookieData, //Cookie data
LPDWORD lpdwSize, the length of //Cookie data
DWORD dwFlags, the usage flag of //Cookie data
LPVOID lpReserved//retention parameter
);
BOOL?InternetGetCookieExW(
LPCWSTR lpszURL, // URL corresponding to Cookie data that read
LPCWSTR lpszCookieName, //Cookie data name
LPWSTR lpszCookieData, //Cookie data
LPDWORD lpdwSize, the length of //Cookie data
DWORD dwFlags, the usage flag of //Cookie data
LPVOID lpReserved//retention parameter
);
It should be noted that, Trident kernel is in the time reading Cookie data, can adopt any one or two in InternetGetCookieExA function and InternetGetCookieExW function to carry out read operation according to the actual conditions of webpage, therefore, the embodiment of the present invention can be blocked one or more in InternetGetCookieExA function and InternetGetCookieExW function according to actual conditions.
In a kind of preferred exemplary of the embodiment of the present invention, can adopt Detours Hook(hook) tackle, realize the adapter of InternetGetCookieExA function and InternetGetCookieExW function.
In the time that the first browser kernel is WebKit kernel, described the first browser kernel side is carried out read operation by WebKit::WebCookieJar::cookies function to the Cookie data of the first website.
The usage example of WebKit::WebCookieJar::cookies function can be as follows:
WebKit::WebString?WebKit::WebCookieJar::cookies(
Const WebKit::WebURL & url, // URL corresponding to Cookie data that read
Const WebKit::WebURL & first_party_for_cookies); // as the URL of front opening webpage
Step 302, obtains the URL information of the first website;
In specific implementation, described URL information can comprise URL and Cookie data name, can not comprise following sub-step 302:
Sub-step S21, obtains URL and the corresponding Cookie data name of the first website.
In the time that the first browser kernel is Trident kernel, in InternetGetCookieExA function and InternetGetCookieExW function, can read lpszUrl parameter, obtain the URL of the first website, can read lpszCookieName parameter, obtain the Cookie data name that prewrites preservation.
In the time that the first browser kernel is WebKit, in WebKit::WebCookieJar::setCookie function, can read WebKit::WebURL & url parameter, obtain the URL of the first website.
Step 303, by URL communication to the second browser kernel side of the first obtained website;
In a preferred embodiment of the present invention, step 303 can comprise following sub-step:
Sub-step S31, transfers to the second browser kernel side by interprocess communication IPC by the URL of the first obtained website and corresponding Cookie data name.
In specific implementation, can be for passing through Send(new ViewHostMsg_GetCookie(MSG_ROUTING_NONE, url, url, request_cookie, & cookie)) URL and the corresponding Cookie data name of the first website of obtaining of interface transfer to the second browser kernel side, and the request_cookie parameter instruction in this interface is forced to read, and reads Cookie data in & cookie parameter.
Step 304, reception the second browser kernel side is returned, the Cookie data of first website of reading according to the URL information of the first website.
The application embodiment of the present invention, the second browser kernel side reads URL according to the setting of self, and returns to the first browser kernel side.
In a preferred embodiment of the present invention, step 304 can comprise following sub-step:
Sub-step S41, receives by interprocess communication IPC the Cookie data read message that the second browser kernel side is returned; Wherein, described Cookie data read message comprises according to value corresponding in the URL of described the first website and the Cookie data of described the first website that Cookie data name reads.
Taking the second browser as WebKit kernel is as example, the Cookie data of WebKit kernel are to adopt sqlite database to be kept in Cookie file, its form as shown in Figure 2, WebKit kernel is in the time carrying out the read operation of Cookie data, can in host_key column, search the URL of the first website, in name column, search Cookie data name, in value column, read the value that Cookie data name is corresponding.
The embodiment of the present invention is being intercepted the read operation of the Cookie data to the first website in the first browser kernel side, to obtain the URL information of the first website, and by URL communication to the second browser kernel side of the first obtained website, to read Cookie data, return to again the first browser kernel, realize in a browser the synchronous of Cookie data reading operation between different browsers kernel, improved the read operation efficiency of Cookie data.
In a preferred embodiment of the present invention, can also comprise the steps:
Step 305, is used website described in described Cookie data entry.
User is without inputting the accounts information such as account name, account password again, adopt Cookie Data web site to send logging request, after the information such as the date of expiration of website account name, account password, cookie information in good authentication Cookie data, just can login this website.
The Cookie data that the embodiment of the present invention reads the second browser kernel preservation at the first browser kernel are carried out the login of website, solve the inconsistent problem of different browsers kernel Cookie data management mode in same browser, can make to obtain unified rendering effect in different browsers kernel, reduce the operation of user's repeat logon, avoid the repeat logon operation of browser, also avoided the operation of Website server duplicate answer, reduce the system resources consumption of browser and Website server, and reduce taking of the network bandwidth, can promote user experiences.
For embodiment of the method, for simple description, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the embodiment of the present invention is not subject to the restriction of described sequence of movement, because according to the embodiment of the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and related action might not be that the embodiment of the present invention is necessary.
With reference to Fig. 4, show the structured flowchart of a kind of according to an embodiment of the invention device embodiment that writes cookie information in browser, specifically can comprise as lower module:
The first blocking module 401, is suitable for intercepting in the first browser kernel side the write operation of the Cookie data to the first website;
The first acquisition module 402, the Cookie data that are suitable for obtaining the URL information of the first website and prewrite preservation;
The first transport module 403, is suitable for the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve module 404, be suitable for preserving in the second browser kernel side URL and the corresponding Cookie data that prewrite preservation of described website.
In a preferred embodiment of the present invention, can also comprise as lower module:
Disabled module 405, is suitable for forbidding preserving the URL of described website and the Cookie data that prewrite preservation of correspondence in the first browser kernel side.
In a preferred embodiment of the present invention, described the first browser kernel can comprise Trident kernel, and described the second browser kernel can comprise non-Trident kernel.
In a preferred embodiment of the present invention, described the first browser kernel can comprise non-Trident kernel, and described the second browser kernel can comprise Trident kernel.
In a preferred embodiment of the present invention, described non-Trident kernel can comprise Webkit kernel.
In a preferred embodiment of the present invention, described the first browser kernel side can be write functional sequence by least one following Cookie data Coookie data are carried out to write operation:
InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function.
In a preferred embodiment of the present invention, described the first browser kernel side can be carried out write operation to Coookie data by WebKit::WebCookieJar::setCookie function.
In a preferred embodiment of the present invention, described the first transport module 403 can also be suitable for:
Send Cookie data write information to the second browser kernel side by interprocess communication IPC; Described Cookie data write information comprises the URL information of the first obtained website and prewrites the Cookie data of preservation.
In a preferred embodiment of the present invention, described Cookie data can comprise Cookie data name and corresponding value.
With reference to Fig. 5, show the structured flowchart of a kind of according to an embodiment of the invention device embodiment that reads cookie information in browser, specifically can comprise as lower module:
The second blocking module 501, is suitable for intercepting in the first browser kernel side the read operation of the Cookie data to the first website;
The second acquisition module 502, is suitable for obtaining the URL information of the first website;
The second transport module 503, is suitable for URL communication to the second browser kernel side of the first obtained website;
Receiver module 504, is suitable for receiving that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
In a preferred embodiment of the present invention, can also comprise as lower module:
Login module 505, is suitable for using website described in described Cookie data entry.
In a preferred embodiment of the present invention, described the first browser kernel can comprise Trident kernel, and described the second browser kernel can comprise non-Trident kernel.
In a preferred embodiment of the present invention, described the first browser kernel can comprise non-Trident kernel, and described the second browser kernel can comprise Trident kernel.
In a preferred embodiment of the present invention, described non-Trident kernel can comprise Webkit kernel.
In a preferred embodiment of the present invention, described the first browser kernel side can be carried out read operation to the Cookie data of the first website by InternetGetCookieExA function and/or InternetGetCookieExW function.
In a preferred embodiment of the present invention, described the first browser kernel side can be carried out read operation to the Cookie data of the first website by WebKit::WebCookieJar::cookies function.
In a preferred embodiment of the present invention, described URL information can comprise URL and Cookie data name, and described the second acquisition module 502 can also be suitable for:
Obtain URL and the corresponding Cookie data name of the first website.
In a preferred embodiment of the present invention, described the second transport module 503 can also be suitable for:
By interprocess communication IPC, the URL of the first obtained website and corresponding Cookie data name are transferred to the second browser kernel side.
In a preferred embodiment of the present invention, described receiver module 504 can also be suitable for:
Receive by interprocess communication IPC the Cookie data read message that the second browser kernel side is returned; Wherein, described Cookie data read message comprises according to value corresponding in the URL of described the first website and the Cookie data of described the first website that Cookie data name reads.
With reference to Fig. 6, show the structured flowchart of a kind of according to an embodiment of the invention browser embodiment 1, specifically can comprise as lower module:
The first blocking module 601, is suitable for intercepting in the first browser kernel side the write operation of the Cookie data to the first website;
The first acquisition module 602, the Cookie data that are suitable for obtaining the URL information of the first website and prewrite preservation;
The first transport module 603, is suitable for the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve module 604, be suitable for preserving in the second browser kernel side URL and the corresponding Cookie data that prewrite preservation of described website.
In a preferred embodiment of the present invention, can also comprise as lower module:
Disabled module 605, is suitable for forbidding preserving the URL of described website and the Cookie data that prewrite preservation of correspondence in the first browser kernel side.
In a preferred embodiment of the present invention, described the first browser kernel can comprise Trident kernel, and described the second browser kernel can comprise non-Trident kernel.
In a preferred embodiment of the present invention, described the first browser kernel can comprise non-Trident kernel, and described the second browser kernel can comprise Trident kernel.
In a preferred embodiment of the present invention, described non-Trident kernel can comprise Webkit kernel.
In a preferred embodiment of the present invention, described the first browser kernel side can be write functional sequence by least one following Cookie data Coookie data are carried out to write operation:
InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function.
In a preferred embodiment of the present invention, described the first browser kernel side can be carried out write operation to Coookie data by WebKit::WebCookieJar::setCookie function.
In a preferred embodiment of the present invention, described the first transport module 603 can also be suitable for:
Send Cookie data write information to the second browser kernel side by interprocess communication IPC; Described Cookie data write information comprises the URL information of the first obtained website and prewrites the Cookie data of preservation.
In a preferred embodiment of the present invention, described Cookie data can comprise Cookie data name and corresponding value.
With reference to Fig. 7, show the structured flowchart of a kind of according to an embodiment of the invention browser embodiment 1, specifically can comprise as lower module:
The second blocking module 701, is suitable for intercepting in the first browser kernel side the read operation of the Cookie data to the first website;
The second acquisition module 702, is suitable for obtaining the URL information of the first website;
The second transport module 703, is suitable for URL communication to the second browser kernel side of the first obtained website;
Receiver module 704, is suitable for receiving that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
In a preferred embodiment of the present invention, can also comprise as lower module:
Login module 705, is suitable for using website described in described Cookie data entry.
In a preferred embodiment of the present invention, described the first browser kernel can comprise Trident kernel, and described the second browser kernel can comprise non-Trident kernel.
In a preferred embodiment of the present invention, described the first browser kernel can comprise non-Trident kernel, and described the second browser kernel can comprise Trident kernel.
In a preferred embodiment of the present invention, described non-Trident kernel can comprise Webkit kernel.
In a preferred embodiment of the present invention, described the first browser kernel side can be carried out read operation to the Cookie data of the first website by InternetGetCookieExA function and/or InternetGetCookieExW function.
In a preferred embodiment of the present invention, described the first browser kernel side can be carried out read operation to the Cookie data of the first website by WebKit::WebCookieJar::cookies function.
In a preferred embodiment of the present invention, described URL information can comprise URL and Cookie data name, and described the second acquisition module 702 can also be suitable for:
Obtain URL and the corresponding Cookie data name of the first website.
In a preferred embodiment of the present invention, described the second transport module 703 can also be suitable for:
By interprocess communication IPC, the URL of the first obtained website and corresponding Cookie data name are transferred to the second browser kernel side.
In a preferred embodiment of the present invention, described receiver module 704 can also be suitable for:
Receive by interprocess communication IPC the Cookie data read message that the second browser kernel side is returned; Wherein, described Cookie data read message comprises according to value corresponding in the URL of described the first website and the Cookie data of described the first website that Cookie data name reads.
For device, browser embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
The algorithm providing at this is intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with demonstration.Various general-purpose systems also can with based on using together with this teaching.According to description above, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.It should be understood that and can utilize various programming languages to realize content of the present invention described here, and the description of above language-specific being done is in order to disclose preferred forms of the present invention.
In the instructions that provided herein, a large amount of details are described.But, can understand, embodiments of the invention can be put into practice in the situation that there is no these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the above in the description of exemplary embodiment of the present invention, each feature of the present invention is grouped together into single embodiment, figure or sometimes in its description.But, the method for the disclosure should be construed to the following intention of reflection: the present invention for required protection requires than the more feature of feature of clearly recording in each claim.Or rather, as reflected in claims below, inventive aspect is to be less than all features of disclosed single embodiment above.Therefore, claims of following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can the module in the equipment in embodiment are adaptively changed and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and can put them in addition multiple submodules or subelement or sub-component.At least some in such feature and/or process or unit are mutually repelling, and can adopt any combination to combine all processes or the unit of disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and disclosed any method like this or equipment.Unless clearly statement in addition, in this instructions (comprising claim, summary and the accompanying drawing followed) disclosed each feature can be by providing identical, be equal to or the alternative features of similar object replaces.
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature instead of further feature included in other embodiment, the combination of the feature of different embodiment means within scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, or realizes with the software module of moving on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that and can use in practice microprocessor or digital signal processor (DSP) to realize according to the equipment of writing cookie information in browser of the embodiment of the present invention, in browser, read the some or all functions of the some or all parts in the equipment of cookie information.The present invention can also be embodied as part or all equipment or the device program (for example, computer program and computer program) for carrying out method as described herein.Realizing program of the present invention and can be stored on computer-readable medium like this, or can there is the form of one or more signal.Such signal can be downloaded and obtain from internet website, or provides on carrier signal, or provides with any other form.
It should be noted above-described embodiment the present invention will be described instead of limit the invention, and those skilled in the art can design alternative embodiment in the case of not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed as element or step in the claims.Being positioned at word " " before element or " one " does not get rid of and has multiple such elements.The present invention can be by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim of having enumerated some devices, several in these devices can be to carry out imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title by these word explanations.
Embodiments of the invention disclose A1, a kind of method of writing cookie information in browser, comprising:
Intercept the write operation of the Cookie data to the first website in the first browser kernel side;
Obtain the URL information and the Cookie data that prewrite preservation of the first website, and by the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve URL and the corresponding Cookie data that prewrite preservation of described website in the second browser kernel side.
A2, method as described in A1, also comprise:
Forbid preserving URL and the corresponding Cookie data that prewrite preservation of described website in the first browser kernel side.
A3, method as described in A1, described the first browser kernel comprises Trident kernel, described the second browser kernel comprises non-Trident kernel.
A4, method as described in A1, described the first browser kernel comprises non-Trident kernel, described the second browser kernel comprises Trident kernel.
A5, method as described in A3 or A4, described non-Trident kernel comprises Webkit kernel.
A6, method as described in A3, described the first browser kernel side is write functional sequence by least one following Cookie data Coookie data is carried out to write operation:
InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function.
A7, method as described in A5, described the first browser kernel side is carried out write operation by WebKit::WebCookieJar::setCookie function to Coookie data.
A8, method as described in A1 or A2 or A3 or A4 or A6 or A7, describedly comprise the URL information of the first obtained website and the step that prewrites Cookie data transmission to the second browser kernel side of preservation:
Send Cookie data write information to the second browser kernel side by interprocess communication IPC; Described Cookie data write information comprises the URL information of the first obtained website and prewrites the Cookie data of preservation.
A9, method as described in A1 or A2 or A3 or A4 or A6 or A7 or A9, described Cookie data comprise Cookie data name and corresponding value.
Embodiments of the invention also disclose B10, a kind of method of reading cookie information in browser, comprising:
Intercept the read operation of the Cookie data to the first website in the first browser kernel side;
Obtain the URL information of the first website, and by URL communication to the second browser kernel side of the first obtained website;
Receive that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
B11, method as described in B10, also comprise:
Use website described in described Cookie data entry.
B12, method as described in B10, described the first browser kernel comprises Trident kernel, described the second browser kernel comprises non-Trident kernel.
B13, method as described in B10, described the first browser kernel comprises non-Trident kernel, described the second browser kernel comprises Trident kernel.
B14, method as described in B12 or B13, described non-Trident kernel comprises Webkit kernel.
B15, method as described in B12, described the first browser kernel side is carried out read operation by InternetGetCookieExA function and/or InternetGetCookieExW function to the Cookie data of the first website.
B16, method as described in B14, described the second browser kernel side is carried out read operation by WebKit::WebCookieJar::cookies function to the Cookie data of the first website.
B17, method as described in B10 or B11 or B12 or B13 or B15 or B16, described URL information comprises URL and Cookie data name, described in obtain the URL information of the first website step comprise:
Obtain URL and the corresponding Cookie data name of the first website.
B18, method as described in B17, the described step by URL communication to the second browser kernel side of the first website obtaining comprises:
By interprocess communication IPC, the URL of the first obtained website and corresponding Cookie data name are transferred to the second browser kernel side.
B19, method as described in B18, described reception the second browser kernel side is returned, and the step of cookie information corresponding to the described website of reading according to the URL information of described the first website comprises:
Receive by interprocess communication IPC the Cookie data read message that the second browser kernel side is returned; Wherein, described Cookie data read message comprises according to value corresponding in the URL of described the first website and the Cookie data of described the first website that Cookie data name reads.
Embodiments of the invention also disclose C20, a kind of device of writing cookie information in browser, comprising:
The first blocking module, is suitable for intercepting in the first browser kernel side the write operation of the Cookie data to the first website;
The first acquisition module, the Cookie data that are suitable for obtaining the URL information of the first website and prewrite preservation;
The first transport module, is suitable for the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve module, be suitable for preserving in the second browser kernel side URL and the corresponding Cookie data that prewrite preservation of described website.
C21, device as described in C20, also comprise:
Disabled module, is suitable for forbidding preserving the URL of described website and the Cookie data that prewrite preservation of correspondence in the first browser kernel side.
C22, device as described in C20, described the first browser kernel comprises Trident kernel, described the second browser kernel comprises non-Trident kernel.
C23, device as described in C20, described the first browser kernel comprises non-Trident kernel, described the second browser kernel comprises Trident kernel.
C24, device as described in C22 or C23, described non-Trident kernel comprises Webkit kernel.
C25, device as described in C22, described the first browser kernel side is write functional sequence by least one following Cookie data Coookie data is carried out to write operation:
InternetSetCookieW function, InternetSetCookieExW function, InternetSetCookieA function, InternetSetCookieExA function.
C26, device as described in C24, described the first browser kernel side is carried out write operation by WebKit::WebCookieJar::setCookie function to Coookie data.
C27, device as described in C20 or C21 or C22 or C23 or C25 or C26, described the first transport module is also suitable for:
Send Cookie data write information to the second browser kernel side by interprocess communication IPC; Described Cookie data write information comprises the URL information of the first obtained website and prewrites the Cookie data of preservation.
C28, device as described in C20 or C21 or C22 or C23 or C25 or C26 or C27, described Cookie data comprise Cookie data name and corresponding value.
Embodiments of the invention also disclose D29, a kind of device of reading cookie information in browser, comprising:
The second blocking module, is suitable for intercepting in the first browser kernel side the read operation of the Cookie data to the first website;
The second acquisition module, is suitable for obtaining the URL information of the first website;
The second transport module, is suitable for URL communication to the second browser kernel side of the first obtained website;
Receiver module, is suitable for receiving that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
D30, device as described in D29, also comprise:
Login module, is suitable for using website described in described Cookie data entry.
D31, device as described in D29, described the first browser kernel comprises Trident kernel, described the second browser kernel comprises non-Trident kernel.
D32, device as described in D29, described the first browser kernel comprises non-Trident kernel, described the second browser kernel comprises Trident kernel.
D33, device as described in D31 or D32, described non-Trident kernel comprises Webkit kernel.
D34, device as described in D31, described the first browser kernel side is carried out read operation by InternetGetCookieExA function and/or InternetGetCookieExW function to the Cookie data of the first website.
D35, device as described in D33, is characterized in that, described the first browser kernel side is carried out read operation by WebKit::WebCookieJar::cookies function to the Cookie data of the first website.
D36, device as described in D29 or D30 or D31 or D32 or D34 or D35, described URL information comprises URL and Cookie data name, described the second acquisition module is also suitable for:
Obtain URL and the corresponding Cookie data name of the first website.
D37, device as described in D36, described the second transport module is also suitable for:
By interprocess communication IPC, the URL of the first obtained website and corresponding Cookie data name are transferred to the second browser kernel side.
D38, device as described in D37, described receiver module is also suitable for:
Receive by interprocess communication IPC the Cookie data read message that the second browser kernel side is returned; Wherein, described Cookie data read message comprises according to value corresponding in the URL of described the first website and the Cookie data of described the first website that Cookie data name reads.
Embodiments of the invention also disclose E39, a kind of browser, comprise the device of writing cookie information in browser described in C20 to C28 any one.
Embodiments of the invention also disclose F40, a kind of browser, comprise the device of reading cookie information in browser described in D29 to D38 any one.

Claims (10)

1. a method of writing cookie information in browser, comprising:
Intercept the write operation of the Cookie data to the first website in the first browser kernel side;
Obtain the URL information and the Cookie data that prewrite preservation of the first website, and by the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve URL and the corresponding Cookie data that prewrite preservation of described website in the second browser kernel side.
2. the method for claim 1, is characterized in that, also comprises:
Forbid preserving URL and the corresponding Cookie data that prewrite preservation of described website in the first browser kernel side.
3. the method for claim 1, is characterized in that, described the first browser kernel comprises Trident kernel, and described the second browser kernel comprises non-Trident kernel.
4. the method for claim 1, is characterized in that, described the first browser kernel comprises non-Trident kernel, and described the second browser kernel comprises Trident kernel.
5. the method as described in claim 3 or 4, is characterized in that, described non-Trident kernel comprises Webkit kernel.
6. a method of reading cookie information in browser, comprising:
Intercept the read operation of the Cookie data to the first website in the first browser kernel side;
Obtain the URL information of the first website, and by URL communication to the second browser kernel side of the first obtained website;
Receive that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
7. a device of writing cookie information in browser, comprising:
The first blocking module, is suitable for intercepting in the first browser kernel side the write operation of the Cookie data to the first website;
The first acquisition module, the Cookie data that are suitable for obtaining the URL information of the first website and prewrite preservation;
The first transport module, is suitable for the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve module, be suitable for preserving in the second browser kernel side URL and the corresponding Cookie data that prewrite preservation of described website.
8. a device of reading cookie information in browser, comprising:
The second blocking module, is suitable for intercepting in the first browser kernel side the read operation of the Cookie data to the first website;
The second acquisition module, is suitable for obtaining the URL information of the first website;
The second transport module, is suitable for URL communication to the second browser kernel side of the first obtained website;
Receiver module, is suitable for receiving that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
9. a browser, comprising:
The first blocking module, is suitable for intercepting in the first browser kernel side the write operation of the Cookie data to the first website;
The first acquisition module, the Cookie data that are suitable for obtaining the URL information of the first website and prewrite preservation;
The first transport module, is suitable for the URL information of the first obtained website and Cookie data transmission to the second browser kernel side that prewrites preservation;
Preserve module, be suitable for preserving in the second browser kernel side URL and the corresponding Cookie data that prewrite preservation of described website.
10. a browser, comprising:
The second blocking module, is suitable for intercepting in the first browser kernel side the read operation of the Cookie data to the first website;
The second acquisition module, is suitable for obtaining the URL information of the first website;
The second transport module, is suitable for URL communication to the second browser kernel side of the first obtained website;
Receiver module, is suitable for receiving that the second browser kernel side returns, the Cookie data of first website of reading according to the URL information of the first website.
CN201410127505.4A 2014-03-31 2014-03-31 Method for writing and reading Cookie information in browser, device and browser Pending CN103955477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410127505.4A CN103955477A (en) 2014-03-31 2014-03-31 Method for writing and reading Cookie information in browser, device and browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410127505.4A CN103955477A (en) 2014-03-31 2014-03-31 Method for writing and reading Cookie information in browser, device and browser

Publications (1)

Publication Number Publication Date
CN103955477A true CN103955477A (en) 2014-07-30

Family

ID=51332752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410127505.4A Pending CN103955477A (en) 2014-03-31 2014-03-31 Method for writing and reading Cookie information in browser, device and browser

Country Status (1)

Country Link
CN (1) CN103955477A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468834A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Method and device for processing Cookie data and browser client side
CN106850751A (en) * 2016-12-26 2017-06-13 武汉斗鱼网络科技有限公司 Data uploading method and device
WO2017215448A1 (en) * 2016-06-12 2017-12-21 阿里巴巴集团控股有限公司 Cross-application data sharing method and web browser
CN107807993A (en) * 2017-11-08 2018-03-16 山东浪潮商用系统有限公司 A kind of implementation method and device of web-page histories writing function
CN108279970A (en) * 2017-12-28 2018-07-13 北京海泰方圆科技股份有限公司 The switching method and apparatus of browser kernel
CN110300154A (en) * 2019-05-30 2019-10-01 上海派拉软件股份有限公司 More browser session sharing methods are realized based on plug-in unit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467506A (en) * 2010-11-02 2012-05-23 腾讯科技(深圳)有限公司 Cookie processing method and system
CN102624891A (en) * 2012-03-08 2012-08-01 腾讯科技(深圳)有限公司 Method for switching kernel of browser and corresponding browser
CN103618760A (en) * 2013-11-07 2014-03-05 北京奇虎科技有限公司 Processing method of cookie information in browser and browser

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467506A (en) * 2010-11-02 2012-05-23 腾讯科技(深圳)有限公司 Cookie processing method and system
CN102624891A (en) * 2012-03-08 2012-08-01 腾讯科技(深圳)有限公司 Method for switching kernel of browser and corresponding browser
CN103618760A (en) * 2013-11-07 2014-03-05 北京奇虎科技有限公司 Processing method of cookie information in browser and browser

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468834A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Method and device for processing Cookie data and browser client side
CN104468834B (en) * 2014-12-26 2017-12-26 北京奇虎科技有限公司 Carry out the method, apparatus and browser client of Cookie data processing
WO2017215448A1 (en) * 2016-06-12 2017-12-21 阿里巴巴集团控股有限公司 Cross-application data sharing method and web browser
US11409584B2 (en) 2016-06-12 2022-08-09 Advanced New Technologies Co., Ltd. Cross-application data sharing
CN106850751A (en) * 2016-12-26 2017-06-13 武汉斗鱼网络科技有限公司 Data uploading method and device
CN106850751B (en) * 2016-12-26 2019-06-21 武汉斗鱼网络科技有限公司 Data uploading method and device
CN107807993A (en) * 2017-11-08 2018-03-16 山东浪潮商用系统有限公司 A kind of implementation method and device of web-page histories writing function
CN107807993B (en) * 2017-11-08 2021-06-15 山东云缦智能科技有限公司 Method and device for realizing webpage history recording function
CN108279970A (en) * 2017-12-28 2018-07-13 北京海泰方圆科技股份有限公司 The switching method and apparatus of browser kernel
CN110300154A (en) * 2019-05-30 2019-10-01 上海派拉软件股份有限公司 More browser session sharing methods are realized based on plug-in unit

Similar Documents

Publication Publication Date Title
US8868637B2 (en) Page rendering for dynamic web pages
CN103955477A (en) Method for writing and reading Cookie information in browser, device and browser
US8499099B1 (en) Converting data into addresses
US9264335B2 (en) Adaptive packaging of network resources
US10015226B2 (en) Methods for making AJAX web applications bookmarkable and crawlable and devices thereof
US9426200B2 (en) Updating dynamic content in cached resources
US8365291B1 (en) Browser extension control flow graph based taint tracking
US8880993B2 (en) Handling unexpected responses to script executing in client-side application
US20180239653A1 (en) Exposing server functions to browser code
CN104731869B (en) The page shows method and device
CN105991398A (en) Instant message IM chatting records storage method and apparatus
US10693971B2 (en) Identifying the best suitable application to open a file shared via a link
CN108829398B (en) Mobile terminal page interaction realization method and device
CN113343293B (en) Universal data desensitization method, assembly, system, computer device and storage medium
CN104572968A (en) Page updating method and device
US20080010359A1 (en) Computer implemented method and system for managing server-based rendering of messages in a heterogeneous environment
WO2018053594A1 (en) Emoji images in text messages
CN103559222A (en) Method and device for displaying page loading time in browsers
US20220350621A1 (en) Systems and methods for in-application dynamic content loading
CN113382083A (en) Webpage screenshot method and device
US10116726B2 (en) Methods for bundling images and devices thereof
CN103647811A (en) A method and an apparatus for application's accessing backstage service
CN107408055B (en) Code cache system
CN113778725A (en) Data verification method and device
CN107918552B (en) Light application calling method and device, client device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140730