WO2013056562A1 - 一种基于Webkit浏览器的wap页面显示方法及装置 - Google Patents
一种基于Webkit浏览器的wap页面显示方法及装置 Download PDFInfo
- Publication number
- WO2013056562A1 WO2013056562A1 PCT/CN2012/077233 CN2012077233W WO2013056562A1 WO 2013056562 A1 WO2013056562 A1 WO 2013056562A1 CN 2012077233 W CN2012077233 W CN 2012077233W WO 2013056562 A1 WO2013056562 A1 WO 2013056562A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- display
- displayed
- width
- webpage
- webkit browser
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Definitions
- the present invention relates to the field of mobile communication technologies, and in particular, to a wap page display method and apparatus based on a WebKit browser.
- Android ⁇ & open source mobile operating system on Linux platform Android platform consists of operating system, middleware, user interface and application software.
- the bottom layer of the platform is based on the Linux kernel developed by C language, providing only basic functions, the middle layer of the platform. It includes function libraries and virtual machines, and the upper layers of the platform are various application software.
- a full-featured browser based on the open source WebKit kernel is integrated inside the Android platform to support both the Wireless Application Communication Protocol (WAP) network and the World Wide Web (WWW).
- WAP Wireless Application Communication Protocol
- WWWW World Wide Web
- the WebKit browser in the Android system cannot know the minimum width required for the wap page layout, and can only use the default 800 pixels as the minimum required for the wap type page layout.
- Width in general, the minimum width required for a wap page layout is about 200 pixels, which is much smaller than 800 pixels, and 800 pixels is larger than the display width of the display (generally less than 480 pixels), so that when the browser displays the wap webpage, A large blank area is created in the horizontal direction of the display in the form of a scroll bar, which reduces the user experience.
- the WebKit browser can determine whether the currently accessed page is a wap page by looking up keywords in the web page address (URL) (such as ".wap.,,, ".m.”, etc.), and then agree that the width of the browser display area is The display width of the display of the mobile terminal, however, the method cannot recognize the webpage address in digital form. For example, if there is no related keyword such as ".wap.” in the webpage address http://218.204.177.211:8080/test/, It is not possible to determine whether the web page is of the wap type. Moreover, in this method, when the minimum width required for the page layout is larger than the display width of the display screen, the display may be confused.
- URL web page address
- the invention provides a method and a device for displaying a wap page based on a WebKit browser, which can effectively identify a wap type webpage when using a WebKit browser, and determine a suitable browser display area width for a wap.
- the page is displayed.
- a method for displaying a wap page based on a WebKit browser including:
- Get the media type parameter value of the web page to be displayed Determining, according to the media type parameter value, that the webpage to be displayed is a wap type, determining a WebKit browser based on a maximum view width of the WebKit browser, a display width of the display screen of the display terminal, and a minimum width required for the page layout of the web page to be displayed. Displaying a display width required for the web page to be displayed;
- a wap page display device based on WebKit browser comprising:
- a first processing unit configured to obtain a media type parameter value of the webpage to be displayed
- a second processing unit configured to determine, according to the media type parameter value, that the webpage to be displayed is a wap type, a maximum view width based on a WebKit browser, a display width of a display screen of the display terminal, and a layout of the webpage to be displayed
- the minimum width is required to determine the display width required by the WebKit browser to display the web page to be displayed
- a third processing unit configured to use the determined display width required by the determined WebKit browser to display the webpage to be displayed as the display area width of the WebKit browser to display the webpage to be displayed.
- the webpage type parameter value of the webpage to be displayed is obtained, and the webpage to be displayed is determined to be a wap type according to the media type parameter value, the maximum view width based on the WebKit browser and the display terminal display screen are displayed.
- the display width and the minimum width required for the web page layout to be displayed determine the display width required by the WebKit browser to display the web page to be displayed, and the required display width is used as the display area width of the WebKit browser to display the web page to be displayed. Therefore, when using the WebKit browser, the wap type webpage can be effectively recognized, and the appropriate browser display area width is determined to display the wap page.
- FIG. 1 is a flowchart of a method for displaying a wap page based on a WebKit browser according to an embodiment of the present invention
- FIG. 2 is a schematic diagram of an object calling relationship when a mimetype value is obtained in an embodiment of the present invention
- FIG. 3 is a structural diagram of a wap page display device based on a WebKit browser according to an embodiment of the present invention.
- the wap type webpage can be effectively identified, and the appropriate browser display area width is determined to display the wap page.
- the view size change function viewSizeChanged of the web view core object WebViewCore in the WebKit browser is called (in Java).
- the method is a minimum unit for implementing the function.
- the method is convenient for presentation, and the method is called a function.
- the specific implementation code of the wap page display method based on the WebKit browser is added to the viewSizeChanged function.
- the specific implementation code can also be set outside the WebKit browser, and then the calling relationship can be set.
- FIG. 1 in the embodiment of the present invention, a detailed method for displaying a wap page based on a WebKit browser is as follows:
- Step 101 Obtain a media type parameter (mimetype) value of the webpage to be displayed.
- the mimetype value of the webpage to be displayed is obtained by calling the media type parameter return (responseMIMEType) function in the frame loading object FrameLoader.
- the mimetype value of the webpage to be displayed After obtaining the mimetype value of the webpage to be displayed, determining whether the mimetype value is "text/vnd.wap.wml", and if so, determining that the webpage to be displayed is of a wap type. If the mimetype value is "text/html", the page to be displayed is html type.
- the media type parameter value of the webpage to be displayed is obtained by calling the responseMIMEType function of the FrameLoader object in the WebKit browser, and the media type parameter value is obtained by the responseMIMEType function from the webpage data of the webpage to be displayed returned by the server.
- the responseMIMEType function in the FrameLoader object in the WebKit browser is invoked through the interrelated object, for example, the Web ViewCore object in the WebKit browser is first called, and the main frame media type in the object is obtained.
- the function nativeGetMainFrameMimeType ( ) calls the local Web view core object NativeWeb ViewCore, and then calls the FrameLoader object through the main frame type get function GetMainFrameType ( ) in the NativeWeb ViewCore object, and returns the mimetype value step by step through the responseMIMEType ( ) function in the Frameloader object.
- Step 102 Determine, according to the mimetype value, that the webpage to be displayed is a wap type, determine a WebKit browsing based on a maximum view width (maxviewport) of the WebKit browser, a display width of the display screen of the display terminal, and a minimum width (minpreftvidth) required for the page layout of the web page to be displayed.
- the WebKit browser displays the display width required for the webpage to be displayed, obtaining the display terminal display screen by using an application programming interface (API) of the display terminal Android system.
- the display width, as well as the minimum width of the page layout opened by the WebKit browser gets the interface GetContentMinPrefWidth to get the minimum width required for the page layout of the page to be displayed.
- the maximum view width of the WebKit browser is a predetermined value, such as 800 pixels.
- the specific code can be expressed as: DisplayMetrics.DENSITY_DEVICE*2, where DisplayMetrics is a display parameter provided by the Android system API.
- the class, DENSITY DEVICE is a static variable of the class, which represents the value of the logical density of the current display device. Multiplying the value by 2 gives the number of pixels corresponding to the display width of the current display device.
- the specific selection is as follows: Displays the maximum width of the display width of the terminal display and the minimum width required to display the page layout of the web page to be displayed Value, and further select the minimum value of the maximum value and the maximum view width of the WebKit browser, and determine the minimum value as the display width required by the WebKit browser to display the web page to be displayed.
- Step 103 The determined display width of the WebKit browser for displaying the webpage to be displayed is used as the display area width of the WebKit browser to display the webpage to be displayed.
- the code in the viewSizeChanged ( ... ) function of the Web ViewCore object set in the WebKit browser can be represented by pseudo code as follows:
- Mimetype The mimetype value of the web page to be displayed obtained
- Width min (Maximum view width of WebKit browser, max (display width of mobile terminal display, minimum width required for web page layout to be displayed))
- the embodiment of the present invention further provides a WAP page display device based on the WebKit browser, and the principle of solving the problem by the device and the wap page display based on the WebKit browser in the embodiment of the present invention.
- the method is similar, so the specific implementation of the device can be referred to the implementation of the above method, and the repeated description will not be repeated.
- the device mainly includes the following processing units:
- the first processing unit 301 is configured to obtain a media type parameter value of the webpage to be displayed;
- the second processing unit 302 is configured to determine, according to the media type parameter value, a maximum view width of the WebKit browser, a display width of the display screen of the display terminal, and a maximum and width determination of the page layout of the web page to be displayed when the web page to be displayed is of the wap type.
- the WebKit browser displays the display width required for the web page to be displayed;
- the third processing unit 303 is configured to use the display width required by the determined WebKit browser to display the webpage to be displayed as the display area width of the WebKit browser to display the webpage to be displayed.
- the mimetype value of the webpage to be displayed when the mimetype value of the webpage to be displayed is obtained, and the mimtype value is used to determine that the webpage to be displayed is a wap type, the maximum view width based on the WebKit browser, the display width of the display screen of the display terminal, and The minimum required width of the web page layout to be displayed determines the display width required by the WebKit browser to display the web page to be displayed, and the display width is used as the display area width of the WebKit browser to display the web page to be displayed, thereby being able to use the WebKit browser. Can effectively identify wap type web pages and determine the appropriate ones The browser displays the width of the area and displays the wap page.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the present invention can be embodied in the form of a computer program product embodied on one or more computer-usable storage interfaces (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
- computer-usable storage interfaces including but not limited to disk storage, CD-ROM, optical storage, etc.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
Claims
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110316963.9 | 2011-10-18 | ||
CN2011103169639A CN102360294A (zh) | 2011-10-18 | 2011-10-18 | 一种基于WebKit浏览器的wap页面显示方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2013056562A1 true WO2013056562A1 (zh) | 2013-04-25 |
Family
ID=45585627
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2012/077233 WO2013056562A1 (zh) | 2011-10-18 | 2012-06-20 | 一种基于Webkit浏览器的wap页面显示方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102360294A (zh) |
WO (1) | WO2013056562A1 (zh) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102360294A (zh) * | 2011-10-18 | 2012-02-22 | 青岛海信移动通信技术股份有限公司 | 一种基于WebKit浏览器的wap页面显示方法及装置 |
CN103685379B (zh) * | 2012-09-12 | 2018-04-20 | 腾讯科技(深圳)有限公司 | 基于webkit内核浏览器的文件上传方法及装置 |
CN103049430A (zh) * | 2012-12-27 | 2013-04-17 | 南京新与力文化传播有限公司 | 一种基于idf格式文件的页面显示方法 |
CN103324438A (zh) * | 2013-06-24 | 2013-09-25 | 北京奇虎科技有限公司 | 一种浏览器的翻页方法、装置及电子设备 |
CN104461537B (zh) * | 2014-12-08 | 2017-11-28 | 浙江网新恩普软件有限公司 | 一种基于浏览器内核的多业务集成*** |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101727495A (zh) * | 2009-12-31 | 2010-06-09 | 优视科技有限公司 | 一种用于移动通讯设备终端的网页页面缩放管理***及其应用方法 |
US20100180192A1 (en) * | 2009-01-09 | 2010-07-15 | Cerner Innovation, Inc. | Dynamically configuring a presentation layer associated with a webpage delivered to a client device |
CN102187296A (zh) * | 2008-09-08 | 2011-09-14 | 高通股份有限公司 | 将基于多面板电子装置的屏幕大小或屏幕分辨率的参数发送到服务器 |
CN102360294A (zh) * | 2011-10-18 | 2012-02-22 | 青岛海信移动通信技术股份有限公司 | 一种基于WebKit浏览器的wap页面显示方法及装置 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060184609A1 (en) * | 2005-02-16 | 2006-08-17 | Li Deng | Simplified scheme of rich content messaging from PC to mobile devices |
CN101150803B (zh) * | 2007-10-24 | 2011-08-24 | 优视科技有限公司 | 微浏览器处理网络数据的方法、微浏览器及其服务器 |
CN102056150B (zh) * | 2010-12-01 | 2013-08-07 | 北京迅捷英翔网络科技有限公司 | 手机终端策略适配装置及方法 |
-
2011
- 2011-10-18 CN CN2011103169639A patent/CN102360294A/zh active Pending
-
2012
- 2012-06-20 WO PCT/CN2012/077233 patent/WO2013056562A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102187296A (zh) * | 2008-09-08 | 2011-09-14 | 高通股份有限公司 | 将基于多面板电子装置的屏幕大小或屏幕分辨率的参数发送到服务器 |
US20100180192A1 (en) * | 2009-01-09 | 2010-07-15 | Cerner Innovation, Inc. | Dynamically configuring a presentation layer associated with a webpage delivered to a client device |
CN101727495A (zh) * | 2009-12-31 | 2010-06-09 | 优视科技有限公司 | 一种用于移动通讯设备终端的网页页面缩放管理***及其应用方法 |
CN102360294A (zh) * | 2011-10-18 | 2012-02-22 | 青岛海信移动通信技术股份有限公司 | 一种基于WebKit浏览器的wap页面显示方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN102360294A (zh) | 2012-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11934630B2 (en) | Hybrid mobile interactions for native apps and web apps | |
US8407584B1 (en) | Stable and secure use of content scripts in browser extensions | |
US11934629B2 (en) | Action tool bar for mobile applications | |
TWI604368B (zh) | Data processing method and device | |
US20130111368A1 (en) | Creating and maintaining images of browsed documents | |
WO2014134934A1 (zh) | 一种双WebView展示定制页面的方法及*** | |
WO2019007327A1 (zh) | 视频播放方法、装置、计算设备以及存储介质 | |
CN106339414A (zh) | 网页渲染方法及装置 | |
CN104978358B (zh) | 桌面展示网页片段的方法及截取网页片段至桌面展示*** | |
JP6255495B2 (ja) | ブラウザリソースの表示方法及び装置、並びにコンピュータ可読記憶媒体 | |
WO2013056562A1 (zh) | 一种基于Webkit浏览器的wap页面显示方法及装置 | |
WO2014029321A1 (en) | Method, device and mobile terminal for restoring page | |
CN107977137B (zh) | 应用页面的对象展示方法、装置和设备 | |
CN106649497B (zh) | 一种网页展示方法及装置 | |
WO2013085595A1 (en) | Selective image loading in mobile browsers | |
US20230281025A1 (en) | Application Interface Layout Method and Electronic Device | |
WO2014071779A1 (zh) | 预打开网页的方法、装置及移动终端 | |
CN110362766B (zh) | 一种页面显示控制方法及终端 | |
WO2022257973A1 (zh) | 页面显示方法及装置、设备、存储介质 | |
CN108038150B (zh) | 网页打开方法、装置及终端设备 | |
CN117194828B (zh) | React中Table滚动分页方法、装置及电子设备 | |
CN106649299A (zh) | 一种网页区块懒加载的方法和装置 | |
CN110618811B (zh) | 信息呈现方法和装置 | |
CN107480218A (zh) | 网页显示方法及装置、电子设备、存储介质 | |
CN115421693A (zh) | 微前端架构的实现方法、装置、计算机设备和存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12841978 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 12841978 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 25/06/2014) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 12841978 Country of ref document: EP Kind code of ref document: A1 |