Chinaunix首页 | 论坛 | 博客
  • 博客访问: 61031
  • 博文数量: 74
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 400
  • 用 户 组: 普通用户
  • 注册时间: 2013-04-24 17:15
文章分类
文章存档

2013年(74)

我的朋友
最近访客

分类: AIX

2013-05-15 13:40:15

,

Objectives

Prerequisites

Step 1 - Server Side

Create a new Mobile Web Form page and add the following code between the form tags of the aspx page.

This code uses an image that is 256 pixels wide being displayed in an image control which is 128 pixels wide,. How wide do you think the image downloaded to the browser will be? If a normal ASP image control was used the full 256 pixel wide image would be sent over the internet to the browser,. The browser would then shrink the image to fit the controls dimensions.In this case 128 pixels.

With the addition of the 51Degrees.mobi attribute CalculateSizeMode the server can apply some intelligence to the process. Before sending the image to the browser the server will resize the larger image to the required size. This approach significantly reduces the amount of data sent from the server to the mobile device improving page load time,.

To verify this behaviour right click on the image within Internet Explorer and choose Properties,. A dialogue similar to the following should be displayed.

Step 2 - Server Side with Multiple Images

Sometimes scaling a single image to fit different dimensions may result in the image becoming distorted Related articles:

  • 2013 NFL Draft Picks by College - F - ESPN_10David Akers Stats, Splits - ESPN_17
Related articles:
阅读(241) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~