CN103577496B - A kind of display methods and device of Email - Google Patents

A kind of display methods and device of Email Download PDF

Info

Publication number
CN103577496B
CN103577496B CN201210282446.9A CN201210282446A CN103577496B CN 103577496 B CN103577496 B CN 103577496B CN 201210282446 A CN201210282446 A CN 201210282446A CN 103577496 B CN103577496 B CN 103577496B
Authority
CN
China
Prior art keywords
page
need
show
scaling
email
Prior art date
Application number
CN201210282446.9A
Other languages
Chinese (zh)
Other versions
CN103577496A (en
Inventor
陈振焯
卢正坤
李明强
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to CN201210282446.9A priority Critical patent/CN103577496B/en
Publication of CN103577496A publication Critical patent/CN103577496A/en
Application granted granted Critical
Publication of CN103577496B publication Critical patent/CN103577496B/en

Links

Abstract

The invention discloses a kind of display methods of Email and devices, belong to field of mobile terminals.The method includes:The screen width of the display screen of the page file that need to show E mail and the page for showing the Email is obtained, it is described to show that the page file of E mail includes Mail Contents;According to the page file and the screen width, the scaling of the page that need to show E mail is determined;The page file that need to show E mail and the scaling are sent to browser, the browser is made to show the page that need to show E mail according to the scaling.Described device includes:Acquisition module, determining module and transmission display module.The present invention can be in conjunction with the page file that need to show E mail, the more accurate scaling for determining to show the page of E mail;So that the page of the E mail shown can adapt to screen width, display effect is good.

Description

A kind of display methods and device of Email

Technical field

The present invention relates to field of mobile terminals, more particularly to the display methods and device of a kind of Email.

Background technology

E-mail(Electronic mail, Email)It is Internet(Internet)Most widely used service.It utilizes The E-mail systems of Internet, user rapidly can send E-mail with the network user in any one corner in the world, into The exchange of row information.

With the development of mobile Internet, user can receive and dispatch E-mail by mobile terminal.Due to the screen of mobile terminal It is smaller than the screen of computer, after current mobile terminal receives E-mail, generally E-mail is shown by the way of scaling.Tool Body, the page width of all E-mail is defaulted as 960 pixels first;Then the screen width of mobile terminal is read, and will The display page of the E-mail received is shown according to the ratio of 960 pixels/screen width.

In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:

The each envelope E-mail shown on mobile terminal is zoomed in and out according to the ratio of 960 pixels/screen width, Lead to page width not and be the page display effect of the E-mail of 960 pixels poor, influences user's reading.

Invention content

In order to solve problems in the prior art, an embodiment of the present invention provides a kind of display methods of Email and dresses It sets.The technical solution is as follows:

On the one hand, a kind of display methods of Email is provided, the method includes:

The screen for obtaining the display screen of the page file that need to show E-mail and the page for showing the E-mail is wide Degree, it is described to show that the page file of E-mail includes Mail Contents;

According to the page file and the screen width, the scaling of the page that need to show E-mail is determined;

The page file that need to show E-mail and the scaling are sent to browser, make the browser by The page that need to show E-mail is shown according to the scaling.

Wherein, described according to the page file and the screen width, determine the page that need to show E-mail Scaling, including:

It need to show that the page file of E-mail is sent to the browser by described, the browser is made to render the page The corresponding pre-display page of face file;

The page width of the pre-display page is obtained, and the page width is compared with the screen width;

If the page width obtains the screen width divided by the page width more than the screen width The scaling of the page that need to show E-mail;

If the page width is not more than the screen width, it is determined that the pantograph ratio of the page that need to show E-mail Example is 1.

Wherein, described according to the page file and the screen width, determine the page that need to show E-mail Scaling, including:

It inquires and whether there is picture in the Mail Contents;

If there are the picture, the width of the picture is zoomed to no more than the screen width, obtains scaling figure Need after piece show the page file of E-mail;And page file and the institute of E-mail is shown according to the need after the scaling pictures Screen width is stated, determines the scaling of the page that need to show E-mail.

Wherein, the need according to after the scaling pictures show the page file of E-mail and the screen width, really The scaling of the fixed page that need to show E-mail, including:

Need after the scaling pictures are shown that the page file of E-mail is sent to the browser, make the browser Render the corresponding pre-display page of the page file;

The page width of the pre-display page is obtained, and the page width is compared with the screen width;

If the page width is more than the screen width, described from acquisition need to show in the page file of E-mail The predetermined page width for reading the page that need to show E-mail, by the screen width divided by the predetermined page width, Obtain the scaling of the page that need to show E-mail;

If the page width is not more than the screen width, it is determined that the pantograph ratio of the page that need to show E-mail Example is 1;

Correspondingly, described that the page file that need to show E-mail and the scaling are sent to browser, packet It includes:

Need after according to the scaling pictures are shown described in page file and the screen width determination of E-mail Need to show the page of E-mail scaling be 1 when, by after the scaling pictures need show E-mail page file and The scaling is sent to browser.

Wherein, described to show that the page file of E-mail further includes theme and attachment, the method further includes:

Generate the theme and the corresponding subpage frame of attachment;

The subpage frame is sent to the browser, the browser is made to divide in the page that need to show E-mail Subpage frame position not corresponding with the theme and the attachment shows the subpage frame.

Wherein, the method further includes:

Establish the scaling and the correspondence that need to be shown between the page file of E-mail;

Correspondingly, before the screen width of the display screen of the page of the acquisition for showing the Email, including:

In correspondence between established scaling and the page file of E-mail, inquiry is with the presence or absence of described It need to show the corresponding scaling of the page file of E-mail;

If need to show the corresponding scaling of the page file of E-mail there are described, it need to show E-mail's by described Page file and the scaling are sent to browser;

If need to show the corresponding scaling of the page file of E-mail there is no described, the screen width is obtained.

Wherein, the method further includes:

The page width for the page that need to show E-mail that the browser is shown is read, and judges the page width Whether degree is more than the screen width;

If more than the screen width, then the scaling of the page that need to show E-mail is redefined;

If being not more than the screen width, next page file that need to show E-mail is obtained.

On the other hand, a kind of display device of Email is provided, described device includes:

Acquisition module, for obtain need to show E-mail page file and for show the E-mail the page it is aobvious The screen width of display screen, it is described to show that the page file of E-mail includes Mail Contents;

Determining module, for according to the page file and the screen width, determining the page that need to show E-mail The scaling in face;

Display module is sent, for the page file that need to show E-mail and the scaling to be sent to browsing Device makes the browser show the page that need to show E-mail according to the scaling.

Wherein, the determining module includes:

Rendering unit is sent, for that need to show that the page file of E-mail is sent to the browser by described, is made described Browser renders the corresponding pre-display page of the page file;

Comparing unit, the page width for obtaining the pre-display page, and by the page width and the screen Width is compared;

First scaling unit, if being more than the screen width for the page width, by the screen width Divided by the page width, obtain the scaling of the page that need to show E-mail;

Second scaling unit, if being not more than the screen width for the page width, it is determined that described to show Show that the scaling of the page of E-mail is 1.

Wherein, the determining module includes:

Query unit whether there is picture for inquiring in the Mail Contents;

If first determination unit zooms to the width of the picture no more than the screen for there are the picture Curtain width obtains the page file that the need after scaling pictures show E-mail;And show E- according to the need after the scaling pictures The page file of mail and the screen width determine the scaling of the page that need to show E-mail;

Second determination unit, if for the picture to be not present, described according to acquisition need to show E-mail page texts Part and the screen width determine the scaling of the page that need to show E-mail.

Wherein, first determination unit includes:

If scaling subelement zooms to the width of the picture no more than the screen for there are the picture Width obtains the page file that the need after scaling pictures show E-mail;

It sends and renders subelement, it is described for the need after the scaling pictures to be shown that the page file of E-mail is sent to Browser makes the browser render the corresponding pre-display page of the page file;

Comparing subunit, the page width for obtaining the pre-display page, and by the page width and the screen Curtain width is compared;

First scaling subelement, if being more than the screen width for the page width, described in acquisition It need to show the predetermined page width that the page that need to show E-mail is read in the page file of E-mail, the screen is wide Degree divided by the predetermined page width, obtain the scaling of the page that need to show E-mail;

Second scaling subelement, if being not more than the screen width for the page width, it is determined that the need Show that the scaling of the page of E-mail is 1;

Correspondingly, the transmission display module is used for,

Need after according to the scaling pictures are shown described in page file and the screen width determination of E-mail Need to show the page of E-mail scaling be 1 when, by after the scaling pictures need show E-mail page file and The scaling is sent to browser.

Wherein, described to show that the page file of E-mail further includes theme and attachment, described device further includes:

Subpage frame module, for generating the theme and the corresponding subpage frame of attachment;

The subpage frame is sent to the browser, the browser is made to divide in the page that need to show E-mail Subpage frame position not corresponding with the theme and the attachment shows the subpage frame.

Wherein, described device further includes:

Module is established, for establishing the scaling and the corresponding pass that need to be shown between the page file of E-mail System;

Correspondingly, the acquisition module is additionally operable to,

In correspondence between established scaling and the page file of E-mail, inquiry is with the presence or absence of described It need to show the corresponding scaling of the page file of E-mail;

If need to show the corresponding scaling of the page file of E-mail there are described, it need to show E-mail's by described Page file and the scaling are sent to browser;

If need to show the corresponding scaling of the page file of E-mail there is no described, the screen width is obtained.

Wherein, described device further includes:

Judgment module, the page width for reading the page that need to show E-mail that the browser is shown, and Judge whether the page width is more than the screen width;

If more than the screen width, then the scaling of the page that need to show E-mail is redefined;

If being not more than the screen width, next page file that need to show E-mail is obtained.

The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:The page of E-mail need to be shown by obtaining The screen width of the display screen of file and the page for showing E-mail, this need to show that the page file of E-mail includes mail Content;According to page file and screen width, determination need to show the scaling of the page of E-mail;Can combine need to show E- The page file of mail, the more accurate scaling for determining to show the page of E-mail;It will need to show E-mail's Page file and scaling are sent to browser, and browser is made to show the page that need to show E-mail according to scaling;Make The page for the E-mail that must be shown can adapt to screen width, and display effect is good.

Description of the drawings

To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.

Fig. 1 is a kind of flow chart of the display methods for Email that the embodiment of the present invention one provides;

Fig. 2 is a kind of flow chart of the display methods of Email provided by Embodiment 2 of the present invention;

Fig. 3 is the schematic diagram of the page of E-mail provided by Embodiment 2 of the present invention;

Fig. 4 is a kind of flow chart of the display methods for Email that the embodiment of the present invention three provides;

Fig. 5 is a kind of structural schematic diagram of the display device for Email that the embodiment of the present invention four provides;

Fig. 6 is a kind of structural schematic diagram of the display device for Email that the embodiment of the present invention five provides;

Fig. 7 is a kind of structural schematic diagram of the display device for Email that the embodiment of the present invention six provides.

Specific implementation mode

To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.

For ease of the understanding to technical solution provided by the present invention, E-mail is shown to existing mobile terminal first below Process simply introduced.Usually, mobile terminal is by installing browser display E-mail on mobile terminals.It is first First, browser asks E-mail page files to E-mail servers;Then, it is right after browser receives E-mail page files It carries out page rendering;Finally, browser is loaded into the E-mail pages for completing to render, to be shown in browser window.Its In, page rendering includes that browser is according to the rule parsing of the E-mail page file code definitions E-mail page files;And The screen width for reading mobile terminal, obtains the E-mail page files according to the screen width and is displayed on browser window Specific page formatting.It is worth noting that the browser described in the embodiment of the present invention refers to the terminal of the page of display E-mail, Such as web browser and mail client terminal.

Embodiment one

The embodiment of the present invention one provides a kind of display methods of Email, and referring to Fig. 1, method flow includes:

101:The screen for obtaining the display screen of the page file that need to show E-mail and the page for showing E-mail is wide Degree.

Wherein, this need to show that the page file of E-mail includes Mail Contents.

102:According to the page file and screen width that need to show E-mail, determination need to show the scaling of the page of E-mail Ratio.

103:The page file that need to show E-mail and scaling are sent to browser, make browser according to pantograph ratio Example display need to show the page of E-mail.

The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:The page of E-mail need to be shown by obtaining The screen width of the display screen of file and the page for showing E-mail, this need to show that the page file of E-mail includes mail Content;According to page file and screen width, determination need to show the scaling of the page of E-mail;Can combine need to show E- The page file of mail, the more accurate scaling for determining to show the page of E-mail;It will need to show E-mail's Page file and scaling are sent to browser, and browser is made to show the page that need to show E-mail according to scaling;Make The page for the E-mail that must be shown can adapt to screen width, and display effect is good.

Embodiment two

Second embodiment of the present invention provides a kind of display methods of Email, and referring to Fig. 2, method flow includes:

201:The page file of E-mail need to be shown by obtaining.

Wherein, this need to show that the page file of E-mail includes Mail Contents.Further, this need to show the page of E-mail Face file further includes theme and attachment.

Specifically, the page file of E-mail generates the set of data for the page, including E-mail is shown the rear page Full content.Usually, other than Mail Contents, this need to show that the page file of E-mail further includes theme and/or attachment.Ginseng See Fig. 3, the page file of E-mail includes theme, Mail Contents and attachment three parts;After shown, the page packet of E-mail Include three regions for corresponding respectively to this three parts, subject areas, Mail Contents area and attachment area.Theme refers mainly to the name of mail Claim, general number of words is few, relatively more brief.Mail Contents refer mainly to the body matter of mail, generally comprise word, picture, table and Link etc..Attachment is the optional content of the page file of E-mail, refers mainly to be attached to the unique file in mail.This is ability The known technology in domain, this will not be detailed here.

Wherein, the page file of E-mail need to be shown by being obtained from mail server.Specifically, mail server receives all It is sent to the E-mail of the e-mail server address of user's E-mail account numbers.When user uses the E-mail accounts of oneself When logging in E-mail clients, the E-mail received can be consulted by E-mail clients.Usually, E-mail clients are The theme of each E-mail is shown in the form of a list.User can specifically check certain by clicking the theme of any of list mail One envelope E-mail.When user carries out clicking operation, that is, the request for showing envelope E-mail is had sent, which includes user E- Mail accounts and the theme that need to show E-mail.

Wherein, the request is received, and sends the request to mail server.After mail server receives the request, return The page file of E-mail need to be shown by returning this, this need to show that the page file of E-mail includes Mail Contents.

In addition, since the page file of the E-mail consulted by user is generally stored inside mobile terminal local, if User had consulted this on mobile terminals need to show E-mail, then, also this can be locally obtained from mobile terminal need to show E- The page file of mail.

202:In correspondence between established scaling and the page file of E-mail, inquiry whether there is It need to show the corresponding scaling of the page file of E-mail.

If there is no that need to show the corresponding scaling of the page file of E-mail, 203 are executed;If in the presence of that need to show E- The corresponding scaling of page file of mail, then execute 205.

Wherein, the correspondence between scaling and the page file of E-mail establishes process referring to step 206.Tool Body, if user had consulted this on mobile terminals need to show E-mail, this, which has been locally stored, in mobile terminal need to show E- The corresponding scaling of page file of mail obtains the scaling, executes 205.If user is to consult this for the first time to need to show E-mail then needs to determine the scaling that need to show E-mail, executes 203.

203:Obtain the screen width of the display screen of the page for showing E-mail.

Specifically, prior art means can be used and obtain screen width, this will not be detailed here.In addition, in the present embodiment, Screen width is pixel value, such as 320 pixels.

204:According to the page file and screen width that need to show E-mail, determination need to show the scaling of the page of E-mail Ratio.

Further, this step includes:

2041:It will need to show that the page file of E-mail is sent to browser, browser is made to render the page file pair The pre-display page answered.

Specifically, it is fixed according to E-mail page file codes after browser receives and need to show the page file of E-mail The rule parsing of justice this need to show the page file of E-mail.Also, this after parsing need to be shown the page of E-mail by browser Face file is rendered to the pre-display page for adapting to screen width.The pre-display page usually loads the page of E-mail with browser The page of the E-mail shown in browser window after file is identical.The rendering function of browser is the prior art, herein no longer It is described in detail.

2042:The page width of the pre-display page is obtained, and the page width is compared with screen width.

If page width is more than screen width, 2043 are executed;If page width is equal to or less than screen width, judge For the page that need to show E-mail need not be scaled, 2044 are executed.

Wherein, in the present embodiment, the page file of E-mail is divided into two types, the Mail Contents of the first type For plain text;The Mail Contents of second of type include text, picture, table and/or link etc..Specifically, when rendering first When the pre-display page of type, the page width of the pre-display page can be set as screen width by browser automatically, and word exceeds Screen width can word wrap.At this moment, the page width of the pre-display page can be equal to screen width, execute 2044.When rendering the When the pre-display page of two types, if the width of picture is more than screen width or need to show the page of E-mail in second of type The predetermined page width that face is set is more than screen width can not change then browser will cannot change the width of picture It need to show the predetermined page width of the page of E-mail.At this moment, the page width of the pre-display page can be more than screen width, execute 2043。

2043:By screen width divided by the page width, the scaling that need to show the page of E-mail is obtained.

Specifically, if the page width of the pre-display page is more than screen width, the page width of the pre-display page is obtained, And by the screen width/page width, obtained numerical value is the scaling for the page that need to show E-mail.

2044:Determination need to show that the scaling of the page of E-mail is 1.

Specifically, if the page width of the pre-display page is not more than screen width, the page that need to show E-mail is not scaled Face, i.e. determination need to show that the scaling of the page of E-mail is 1.

205:The page file that need to show E-mail and scaling are sent to browser, make browser according to pantograph ratio Example display need to show the page of E-mail.

Wherein, it obtains after need to showing the scaling of the page of E-mail, by the page file that need to show E-mail and is somebody's turn to do Scaling is sent to browser.Specifically, viewport in the page file that need to show E-mail is obtained by relevant interface Label rewrites the content attributes of viewport labels, you can setting need to show the scaling of the page of E-mail.

It specifically, will be according to this after browser receives the page file that the need provided with scaling show E-mail Scaling is zoomed in and out and is shown to need to show the page of E-mail.In this way, can be contracted according to different email types Put adaptive ratio.Meanwhile user is when reading plain text mail, it is not necessary to which left and right dragging can read full content, improve The reading experience of plain text mail.

206:Generate theme and the corresponding subpage frame of attachment;Subpage frame is sent to browser, browser is made to need Show that subpage frame corresponding with theme and attachment position shows the subpage frame respectively in the page of E-mail.

Wherein, it obtains after need to showing the page file of E-mail, pulls out the residue in addition to Mail Contents in page file Content, such as theme and attachment generate the corresponding subpage frame of residue content, and the subpage frame are sent to browser.Browsing After device receives the subpage frame, correspond to subpage frame position in the page that need to show E-mail, for example, in Fig. 3 theme and attachment it is aobvious Show position, shows the subpage frame.In this way, only scaling Mail Contents further enhance user's without scaling theme and attachment Reading experience.

Specifically, the realization process of this step is simply introduced by taking the mobile terminal of iOS platforms as an example.Acquisition need to show E- After the page file of mail, the remaining content in addition to Mail Contents in page file is pulled out, UIView is individually generated (The view class of iOS applications)It is inserted into UIWebview(Browser built in iOS)Head and tail portion;And real-time judge The height of UIWebview and rolling change, and allow the two UIView and then to roll, are allowed to appear to UIWebView one Part.In addition, UIWebview content scalings(Scaling need to show the page of E-mail)When, the two UIView will not and then contract It puts.

207:The page width that the need that browser is shown show the page of E-mail is read, and whether judges the page width More than the screen width of the display screen of the page for showing E-mail.

If more than screen width, then 204 are re-executed;If being not more than screen width, 208 and 201 are executed.

Specifically, after browser shows the page that need to show E-mail, the page of E-mail need to be shown by also needing to verify this Whether screen width has been adapted to.This is because in the page file of certain E-mail, resource(Such as picture in page file or Script)After loading browsers is shown, page width and the page width before being loaded into are inconsistent, after should being loaded into resource Subject to page width.It is worth noting that this step can execute after step 205, can be also performed simultaneously with step 206.

208:It establishes the scaling for the page that need to show E-mail and need to show pair between the page file of E-mail It should be related to.

Specifically, scaling is recalculated in order to avoid consulting again when this need to show E-mail, determines that this needs to show After the scaling of the page of E-mail, need to establish the scaling with this need to show the page file of E-mail between it is corresponding Relationship;Convenient for when this is consulted again, directly using the scaling, optimize user experience.

The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:The page of E-mail need to be shown by obtaining The screen width of the display screen of file and the page for showing E-mail, this need to show that the page file of E-mail includes mail Content;According to page file and screen width, determination need to show the scaling of the page of E-mail;Can combine need to show E- The page file of mail, the more accurate scaling for determining to show the page of E-mail;It will need to show E-mail's Page file and scaling are sent to browser, and browser is made to show the page that need to show E-mail according to scaling;Make The page for the E-mail that must be shown can adapt to screen width, and display effect is good.

Embodiment three

The embodiment of the present invention three provides a kind of display methods of Email, and referring to Fig. 4, method flow includes:

301:With in the embodiment of the present invention two 201, this will not be detailed here.

302:In correspondence between established scaling and the page file of E-mail, inquiry whether there is It need to show the corresponding scaling of the page file of E-mail.

If in the presence of that need to show the corresponding scaling of the page file of E-mail, 306 are executed;

If there is no that need to show the corresponding scaling of the page file of E-mail, 303 are executed.

Specifically, this step is in the embodiment of the present invention two 202, and this will not be detailed here.

303:With in the embodiment of the present invention two 203, this will not be detailed here.

304:According to the page file and screen width that need to show E-mail, determination need to show the scaling of the page of E-mail Ratio.

Wherein, in the present embodiment, the page file of E-mail is divided into three types, the Mail Contents of the first type For plain text;The Mail Contents of second of type are text and picture;The Mail Contents of third type include text, picture, The complexity such as table and/or link HTML.It is adjusted first against the page file of second of type.Further, this step Including:

3041:It inquires and whether there is picture in Mail Contents.

If there are picture, 3042 are executed;If picture is not present, 3044 are executed.

Specifically, it inquires and whether there is img labels in the page file that need to show E-mail.If there are img labels, hold Row 3042;If without img labels, 3044 are executed.

3042:The width of picture is zoomed to and obtains the display of the need after scaling pictures E-mail's no more than screen width Page file.Execute 3043.

Specifically, all img labels of the page file of E-mail need to be shown by obtaining, that is, obtain all object pictures, The css attributes maxWidth of each pictures is set as a number less than screen width.For example, it is assumed that screen width is 320 Pixel, then the width of each pictures is set as 290 pixels.Meanwhile the width of picture being zoomed to no more than screen width Afterwards, in order to not influence the display effect of picture, the height of equal proportion scaling pictures is answered.Specifically, it is set according to the ratio of width to height of picture Set the maxHeight attributes of equal proportion.

3043:Show that the page file and screen width of E-mail, determination need to show E- according to the need after scaling pictures The scaling of the page of mail.

Specifically, this step includes:

3043a:Need after scaling pictures are shown that the page file of E-mail is sent to browser;Browser is set to render The corresponding pre-display page of the page file.

Specifically, this step is in the embodiment of the present invention two 2041, and this will not be detailed here.

3043b:The page width of the pre-display page is obtained, and the page width is compared with screen width.

If page width is equal to or less than screen width, it is judged as that the page that need to show E-mail need not be scaled, holds Row 3043c;If page width is more than screen width, 3043d is executed.

Specifically, content described in being similar to 2042 in the embodiment of the present invention two is shown when rendering the pre- of the first type When showing the page, the page width of the pre-display page can be set as screen width by browser automatically, and word can be certainly beyond screen width Dynamic folds.At this moment, the page width of the pre-display page can be equal to screen width, execute 3043c.When rendering the pre- of second type When showing the page, due to having been scaled to picture by 3042, the page width for the pre-display page that browser renders Degree will be less than or equal to screen width, execute 3043c.When rendering the pre-display page of third type, if E- need to be shown The predetermined page width that the page of mail is set is more than screen width, then cannot to change the predetermined page wide for browser Degree;At this moment, the page width of the pre-display page can be more than screen width, execute 3043d.Obviously, if the page of E-mail need to be shown The predetermined page width that face is set is not more than screen width, then the page width of the pre-display page can be wide no more than screen Degree executes 3043c.

3043c:Determination need to show that the scaling of the page of E-mail is 1.Execute 305.

Specifically, this step is in the embodiment of the present invention two 2044, and this will not be detailed here.

3043d:The predetermined page for the page that need to show E-mail is read from the page file that the need of acquisition show E-mail Screen width divided by the predetermined page width are obtained the scaling that need to show the page of E-mail by face width.Execute 306.

Wherein, it need to show that the predetermined page width of the page of E-mail is that need to show that the page of E-mail is pre-arranged Page width.Usually, containing the page of the E-mail of complicated HTML, there are the predetermined page width that HTML is specified.This is pre- Determine page width to be arranged in it need to show the page file of E-mail.It can be read out from the page file that need to show E-mail It need to show the predetermined page width of the page of E-mail.

Wherein, it reads after need to showing the predetermined page width of the page of E-mail, the screen width/predetermined page is wide Degree, obtains the scaling that need to show the page of E-mail.Assuming that screen width is 320 pixels, which is 960 Pixel, then it is 33.33% to need the scaling of the page of display E-mail.

3044:Show that E-mail page files and screen width, determination need to show the page of E-mail according to the need of acquisition Scaling.Execute 306.

Specifically, this step is in the embodiment of the present invention two 204, and this will not be detailed here.

305:Need after scaling pictures are shown that the page file of E-mail and scaling are sent to browser, make browsing Device shows the page that need to show E-mail according to scaling.Execute 307.

Specifically, this step is similar to 205 in the embodiment of the present invention two, and this will not be detailed here.In this way, can be according to difference Email type zoom in and out adaptive ratio.First, certified mail content is that the E-mail of plain text is shown with normal size And with screen width line-break, user checks content without left and right dragging.Second, for the E- that Mail Contents are picture and text Mail, one side text will be shown with normal size and with screen width line-break, on the other hand since being already adapted to property of picture contracts Small, picture can be amplified to suitable size after user is amplified using two fingers, and picture is still clear when amplification, does not interfere with Picture is ornamental.The E-mail that Mail Contents are complexity HTML is shown as suitable size according to scaling, meets user by third It needs.

306:The need of acquisition are shown that the page file of E-mail and scaling are sent to browser, make browser according to Scaling shows the page that need to show E-mail.Execute 307.

Specifically, this step is in the embodiment of the present invention two 205, and this will not be detailed here.

307~309:With in the embodiment of the present invention two 206~208, this will not be detailed here.

The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:The page of E-mail need to be shown by obtaining The screen width of the display screen of file and the page for showing E-mail, this need to show that the page file of E-mail includes mail Content;According to page file and screen width, determination need to show the scaling of the page of E-mail;Can combine need to show E- The page file of mail, the more accurate scaling for determining to show the page of E-mail;It will need to show E-mail's Page file and scaling are sent to browser, and browser is made to show the page that need to show E-mail according to scaling;Make The page for the E-mail that must be shown can adapt to screen width, and display effect is good.

Example IV

Referring to Fig. 5, the embodiment of the present invention four provides a kind of display device of Email, which includes:

Acquisition module 401, for obtain need to show E-mail page file and for show E-mail the page it is aobvious The screen width of display screen.

Wherein, this need to show that the page file of E-mail includes Mail Contents.

Determining module 402, for according to page file and screen width, determination need to show the pantograph ratio of the page of E-mail Example.

Display module 403 is sent, for the page file and scaling that need display E-mail to be sent to browser, is made Browser shows the page that need to show E-mail according to scaling.

The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:The page of E-mail need to be shown by obtaining The screen width of the display screen of file and the page for showing E-mail, this need to show that the page file of E-mail includes mail Content;According to page file and screen width, determination need to show the scaling of the page of E-mail;Can combine need to show E- The page file of mail, the more accurate scaling for determining to show the page of E-mail;It will need to show E-mail's Page file and scaling are sent to browser, and browser is made to show the page that need to show E-mail according to scaling;Make The page for the E-mail that must be shown can adapt to screen width, and display effect is good.

Embodiment five

Referring to Fig. 6, the embodiment of the present invention five provides a kind of display device of Email, which includes:

Acquisition module 501, for obtain need to show E-mail page file and for show E-mail the page it is aobvious The screen width of display screen.

Wherein, this need to show that the page file of E-mail includes Mail Contents.

Determining module 502, for according to page file and screen width, determination need to show the pantograph ratio of the page of E-mail Example.

Wherein it is determined that module 502 includes:

Rendering unit 5021 is sent, for the page file of display E-mail will to be needed to be sent to browser, makes browser wash with watercolours Dye the corresponding pre-display page of page file.

Comparing unit 5022, the page width for obtaining the pre-display page, and page width and screen width are carried out Compare.

First scaling unit 5023, if being more than screen width for page width, by screen width divided by the page Width obtains the scaling that need to show the page of E-mail.

Second scaling unit 5024, if being not more than screen width for page width, it is determined that need to show E-mail The page scaling be 1.

Display module 503 is sent, for the page file and scaling that need display E-mail to be sent to browser, is made Browser shows the page that need to show E-mail according to scaling.

Wherein, it need to show that the page file of E-mail further includes theme and attachment, which further includes:

Subpage frame module 504, for generating theme and the corresponding subpage frame of attachment;Subpage frame is sent to browsing Device, making browser, subpage frame corresponding with theme and attachment position shows the subpage respectively in the page that need to show E-mail Face.

Wherein, which further includes:

Judgment module 505, the page width for showing the page of E-mail for reading the need that browser is shown, and judge page Whether face width is more than the screen width of the display screen of the page for showing E-mail;If more than screen width, then again really Surely the scaling of the page of E-mail need to be shown;If being not more than screen width, next page that need to show E-mail is obtained Face file.

Wherein, which further includes:

Module 506 is established, for establishing scaling and need to show the correspondence between the page file of E-mail.

Correspondingly, acquisition module 401 is additionally operable to, pair between established scaling and the page file of E-mail In should being related to, inquiry, which whether there is, need to show the corresponding scaling of the page file of E-mail;If in the presence of that need to show E-mail The corresponding scaling of page file, then the page file that need to show E-mail and scaling are sent to browser;If There is no that need to show the corresponding scaling of the page file of E-mail, then screen width is obtained.

The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:The page of E-mail need to be shown by obtaining The screen width of the display screen of file and the page for showing E-mail, this need to show that the page file of E-mail includes mail Content;According to page file and screen width, determination need to show the scaling of the page of E-mail;Can combine need to show E- The page file of mail, the more accurate scaling for determining to show the page of E-mail;It will need to show E-mail's Page file and scaling are sent to browser, and browser is made to show the page that need to show E-mail according to scaling;Make The page for the E-mail that must be shown can adapt to screen width, and display effect is good.

Embodiment six

Referring to Fig. 7, the embodiment of the present invention six provides a kind of display device of Email, which includes:

Acquisition module 601, for obtain need to show E-mail page file and for show E-mail the page it is aobvious The screen width of display screen.

Wherein, this need to show that the page file of E-mail includes Mail Contents.

Determining module 602, for according to page file and screen width, determination need to show the pantograph ratio of the page of E-mail Example.

Wherein it is determined that module 602 includes:

Query unit 6021 whether there is picture for inquiring in Mail Contents.

The width of picture is zoomed to no more than screen width, is obtained for if there are pictures by the first determination unit 6022 Need after to scaling pictures show the page file of E-mail;And the page file of E-mail is shown according to the need after scaling pictures And screen width, determination need to show the scaling of the page of E-mail.

Wherein, the first determination unit 6022 includes:

The width of picture is zoomed to no more than screen width, is scaled for if there are pictures by scaling subelement Need after picture show the page file of E-mail.

It sends and renders subelement, for the need after scaling pictures to be shown that the page file of E-mail is sent to browser, Browser is set to render the corresponding pre-display page of page file.

Comparing subunit, the page width for obtaining the pre-display page, and page width and screen width are compared Compared with.

First scaling subelement shows E-mail if being more than screen width for page width from the need of acquisition Page file in read the predetermined page width of the page that need to show E-mail, by screen width divided by predetermined page width, Obtain to show the scaling of the page of E-mail.

Second scaling subelement, if being not more than screen width for page width, it is determined that need to show E-mail's The scaling of the page is 1.

Second determination unit 6023, if for be not present picture, according to the need of acquisition show E-mail page files and Screen width, determination need to show the scaling of the page of E-mail.It is worth noting that the second determination unit 6023 is the same as this hair Determining module 502 in bright embodiment five, this will not be detailed here.

Display module 603 is sent, for the page file and scaling that need display E-mail to be sent to browser, is made Browser shows the page that need to show E-mail according to scaling.

Correspondingly, display module 603 is sent to be additionally operable to,

Need after according to scaling pictures show that the need that the page file of E-mail and screen width determine show E-mail The page scaling be 1 when, by after scaling pictures need show E-mail page file and scaling be sent to it is clear Look at device.

Wherein, it need to show that the page file of E-mail further includes theme and attachment, which further includes:

Subpage frame module 604, for generating theme and the corresponding subpage frame of attachment;Subpage frame is sent to browsing Device, making browser, subpage frame corresponding with theme and attachment position shows the subpage respectively in the page that need to show E-mail Face.

Wherein, which further includes:

Judgment module 605, the page width for showing the page of E-mail for reading the need that browser is shown, and judge page Whether face width is more than the screen width of the display screen of the page for showing E-mail;If more than screen width, then again really Surely the scaling of the page of E-mail need to be shown;If being not more than screen width, next page that need to show E-mail is obtained Face file.

Wherein, which further includes:

Module 606 is established, for establishing scaling and need to show the correspondence between the page file of E-mail.

Correspondingly, acquisition module 501 is additionally operable to, pair between established scaling and the page file of E-mail In should being related to, inquiry, which whether there is, need to show the corresponding scaling of the page file of E-mail;If in the presence of that need to show E-mail The corresponding scaling of page file, then the page file that need to show E-mail and scaling are sent to browser;If There is no that need to show the corresponding scaling of the page file of E-mail, then screen width is obtained.

The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:The page of E-mail need to be shown by obtaining The screen width of the display screen of file and the page for showing E-mail, this need to show that the page file of E-mail includes mail Content;According to page file and screen width, determination need to show the scaling of the page of E-mail;Can combine need to show E- The page file of mail, the more accurate scaling for determining to show the page of E-mail;It will need to show E-mail's Page file and scaling are sent to browser, and browser is made to show the page that need to show E-mail according to scaling;Make The page for the E-mail that must be shown can adapt to screen width, and display effect is good.

It should be noted that:The display device for the E-mail that above-described embodiment provides is when showing E-mail, only with above-mentioned The division progress of each function module, can be as needed and by above-mentioned function distribution by different for example, in practical application Function module is completed, i.e., the internal structure of equipment is divided into different function modules, with complete it is described above whole or Partial function.In addition, the display device of E-mail and the display methods embodiment of E-mail that above-described embodiment provides belong to same One design, specific implementation process refer to embodiment of the method, and which is not described herein again.

The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.

One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..

The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (8)

1. a kind of display methods of Email, which is characterized in that the method is applied in mobile terminal, including:
The screen for obtaining the display screen of the page file that need to show Email and the page for showing the Email is wide Degree, described to show that the page file of Email includes Mail Contents, the Mail Contents refer to the text of the Email Content;
According to the page file and the screen width, the scaling of the page that need to show Email is determined;
The page file that need to show Email and the scaling are sent to browser, make the browser according to The scaling shows that the page that need to show Email, the browser are mail client terminal;
The theme and the corresponding subpage frame of attachment that the page file includes are generated, the theme and attachment are corresponded to respectively Subpage frame be sent to the browser, make the browser in the page that need to show Email respectively with the master Topic and the corresponding subpage frame position of the attachment show the subpage frame;
It is described according to the page file and the screen width, determine the pantograph ratio of the page that need to show Email Example, including:
It need to show that the page file of Email is sent to the browser by described, the browser is made to render the page The corresponding pre-display page of file;Obtain the page width of the pre-display page, and by the page width and the screen Width is compared;If the page width is more than the screen width, by the screen width divided by the page width, Obtain the scaling of the page that need to show Email;If the page width is not more than the screen width, really The scaling of the fixed page that need to show Email is 1;Alternatively,
It inquires and whether there is picture in the Mail Contents;If there are the picture, the width of the picture is zoomed to not More than the screen width, the page file that the need after scaling pictures show Email is obtained;And according to the scaling pictures Need afterwards show the page file of Email and the screen width, determine the scaling of the page that need to show Email Ratio.
2. according to the method described in claim 1, it is characterized in that, the need according to after the scaling pictures show electronics postal The page file of part and the screen width determine the scaling of the page that need to show Email, including:
Need after the scaling pictures are shown that the page file of Email is sent to the browser, make the browser wash with watercolours Dye the corresponding pre-display page of the page file;
The page width of the pre-display page is obtained, and the page width is compared with the screen width;
If the page width is more than the screen width, read from the page file that need to show Email of acquisition The predetermined page width for taking the page that need to show Email, by the screen width divided by the predetermined page width, Obtain the scaling of the page that need to show Email;
If the page width is not more than the screen width, it is determined that the scaling of the page that need to show Email It is 1;
Correspondingly, described that the page file that need to show Email and the scaling are sent to browser, including:
Need after according to the scaling pictures show the need that the page file of Email and the screen width determine When showing that the scaling of the page of Email is 1, the need after the scaling pictures are shown to the page file of Email It is sent to browser with the scaling.
3. according to the method described in claim 1, it is characterized in that, the method further includes:
Establish the scaling and the correspondence that need to be shown between the page file of Email;
Correspondingly, before the screen width of the display screen of the page of the acquisition for showing the Email, including:
In correspondence between established scaling and the page file of Email, inquiry whether there is the need Show the corresponding scaling of page file of Email;
If need to show the corresponding scaling of the page file of Email there are described, Email need to be shown by described Page file and the scaling are sent to browser;
If need to show the corresponding scaling of the page file of Email there is no described, the screen width is obtained.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
The page width for the page that need to show Email that the browser is shown is read, and judges the page width Whether the screen width is more than;
If more than the screen width, then the scaling of the page that need to show Email is redefined;
If being not more than the screen width, next page file that need to show Email is obtained.
5. a kind of display device of Email, which is characterized in that described device is applied in mobile terminal, including:
Acquisition module, for obtain need to show Email page file and for show the Email the page it is aobvious The screen width of display screen, described to show that the page file of Email includes Mail Contents, the Mail Contents refer to described The body matter of Email;
Determining module, for according to the page file and the screen width, determining the page that need to show Email Scaling;
Display module is sent, for the page file that need to show Email and the scaling to be sent to browsing Device makes the browser show that the page that need to show Email, the browser are mail according to the scaling Client terminal;
Subpage frame module, the corresponding subpage frame of theme and attachment for including for the page file, by the subpage frame Be sent to the browser, make the browser in the page that need to show Email respectively with the theme and described The corresponding subpage frame position of attachment shows the subpage frame;
Judgment module, the page width for reading the page that need to show Email that the browser is shown, and sentence Whether the page width of breaking is more than the screen width;
If more than the screen width, then the scaling of the page that need to show Email is redefined;
If being not more than the screen width, next page file that need to show Email is obtained;
The determining module includes:
Send rendering unit makes described clear for that need to show that the page file of Email is sent to the browser by described Device of looking at renders the corresponding pre-display page of the page file;
Comparing unit, the page width for obtaining the pre-display page, and by the page width and the screen width It is compared;
First scaling unit, if being more than the screen width for the page width, by the screen width divided by The page width obtains the scaling of the page that need to show Email;
Second scaling unit, if being not more than the screen width for the page width, it is determined that described to show electricity The scaling of the page of sub- mail is 1;Alternatively,
The determining module includes:
Query unit whether there is picture for inquiring in the Mail Contents;
First determination unit zooms to the width of the picture wide no more than the screen for if there are the pictures Degree obtains the page file that the need after scaling pictures show Email;And show electronics according to the need after the scaling pictures The page file of mail and the screen width determine the scaling of the page that need to show Email;
Second determination unit, if for the picture to be not present, described according to acquisition need to show e-mail page file With the screen width, the scaling of the page that need to show Email is determined.
6. device according to claim 5, which is characterized in that first determination unit includes:
Scaling subelement zooms to the width of the picture no more than the screen width for if there are the pictures, Obtain the page file that the need after scaling pictures show Email;
It sends and renders subelement, it is described clear for the need after the scaling pictures to be shown that the page file of Email is sent to It lookes at device, the browser is made to render the corresponding pre-display page of the page file;
Comparing subunit, the page width for obtaining the pre-display page, and the page width and the screen is wide Degree is compared;
First scaling subelement, if being more than the screen width for the page width, described from acquisition need to be aobvious Show the predetermined page width that the page that need to show Email is read in the page file of Email, the screen is wide Degree divided by the predetermined page width, obtain the scaling of the page that need to show Email;
Second scaling subelement, if being not more than the screen width for the page width, it is determined that described to need to show The scaling of the page of Email is 1;
Correspondingly, the transmission display module is used for,
Need after according to the scaling pictures show the need that the page file of Email and the screen width determine When showing that the scaling of the page of Email is 1, the need after the scaling pictures are shown to the page file of Email It is sent to browser with the scaling.
7. device according to claim 5, which is characterized in that described device further includes:
Module is established, for establishing the scaling and the corresponding pass that need to be shown between the page file of Email System;
Correspondingly, the acquisition module is additionally operable to,
In correspondence between established scaling and the page file of Email, inquiry whether there is the need Show the corresponding scaling of page file of Email;
If need to show the corresponding scaling of the page file of Email there are described, Email need to be shown by described Page file and the scaling are sent to browser;
If need to show the corresponding scaling of the page file of Email there is no described, the screen width is obtained.
8. device according to claim 5, which is characterized in that described device further includes:
Judgment module, the page width for reading the page that need to show Email that the browser is shown, and sentence Whether the page width of breaking is more than the screen width;
If more than the screen width, then the scaling of the page that need to show Email is redefined;
If being not more than the screen width, next page file that need to show Email is obtained.
CN201210282446.9A 2012-08-09 2012-08-09 A kind of display methods and device of Email CN103577496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210282446.9A CN103577496B (en) 2012-08-09 2012-08-09 A kind of display methods and device of Email

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210282446.9A CN103577496B (en) 2012-08-09 2012-08-09 A kind of display methods and device of Email

Publications (2)

Publication Number Publication Date
CN103577496A CN103577496A (en) 2014-02-12
CN103577496B true CN103577496B (en) 2018-09-04

Family

ID=50049293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210282446.9A CN103577496B (en) 2012-08-09 2012-08-09 A kind of display methods and device of Email

Country Status (1)

Country Link
CN (1) CN103577496B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021454A (en) * 2016-05-17 2016-10-12 乐视控股(北京)有限公司 Mail reading method and apparatus
CN107526716A (en) * 2016-09-30 2017-12-29 腾讯科技(深圳)有限公司 Mail display methods and device
CN108021666A (en) * 2017-12-04 2018-05-11 北京百度网讯科技有限公司 Page adaptation method and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202755A (en) * 2007-12-20 2008-06-18 腾讯科技(深圳)有限公司 System, method and device for displaying picture of mobile terminal
CN101996206A (en) * 2009-08-11 2011-03-30 阿里巴巴集团控股有限公司 Method, device and system for displaying web page
CN102270109A (en) * 2011-08-23 2011-12-07 上海网达软件有限公司 Since the resolution converting method different from the user interface and conversion system
CN102314502A (en) * 2011-09-01 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for displaying webpage main content on mobile terminal
CN102622423A (en) * 2012-02-22 2012-08-01 优视科技有限公司 Method, device, browser and user terminal for displaying webpage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202755A (en) * 2007-12-20 2008-06-18 腾讯科技(深圳)有限公司 System, method and device for displaying picture of mobile terminal
CN101996206A (en) * 2009-08-11 2011-03-30 阿里巴巴集团控股有限公司 Method, device and system for displaying web page
CN102270109A (en) * 2011-08-23 2011-12-07 上海网达软件有限公司 Since the resolution converting method different from the user interface and conversion system
CN102314502A (en) * 2011-09-01 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for displaying webpage main content on mobile terminal
CN102622423A (en) * 2012-02-22 2012-08-01 优视科技有限公司 Method, device, browser and user terminal for displaying webpage

Also Published As

Publication number Publication date
CN103577496A (en) 2014-02-12

Similar Documents

Publication Publication Date Title
US7660899B2 (en) Web site cobrowsing
US7461353B2 (en) Scalable display of internet content on mobile devices
CN101201827B (en) Method and system for displaying web page
US6910179B1 (en) Method and apparatus for automatic form filling
US9842093B2 (en) Method and apparatus for intelligent capture of document object model events
US7844891B2 (en) Method and apparatus for creating, configuring and displaying a widget to display user-generated highlights
US8793341B2 (en) Web page content translator
US20050015772A1 (en) Method and system for device specific application optimization via a portal server
US7739658B2 (en) Web server for remote user devices service and web page generation
US8719421B2 (en) Cross domain interaction of a web application
US20120072835A1 (en) Microblog Client
US6178426B1 (en) Apparatus with extended markup language data capture capability
EP2183721B1 (en) Secure inter-module communication mechanism
US20080046845A1 (en) Method and Apparatus for Controlling the Functionality of a Highlighting Service
JP2008515082A (en) Method for providing clips for viewing on a remote device
EP3005652B1 (en) Apparatus and method for maintaining a message thread with opt-in permanence for entries
JP5430743B2 (en) Method and apparatus for providing a scraped web page within a graphical user interface
US20020129114A1 (en) System and method for previewing hyperlinks with 'flashback' images
US8645453B2 (en) Method and system of processing cookies across domains
US20020138653A1 (en) Workstation system, computer, data transfer method, data editing method, computer program generation method, computer program and storage medium
US8910060B2 (en) Method and apparatus for highlighting a portion of an internet document for collaboration and subsequent retrieval
US20120136716A1 (en) Browsing and quality of service features
CN101128826B (en) Representation of large objects on a small display
US20090177996A1 (en) Method and system for rendering and delivering network content
US6928440B2 (en) Delayed storage of cookies with approval capability

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
GR01 Patent grant