Content summary
In this lecture, I explained the formats of images in the online world and their characteristics.
- JPG or JPEG
- GIF
- PNG
At the same time, we also explained three common strategies for improving the speed of displaying images on webpages through examples.
- According to the 80/20 rule, a small image is displayed first. A large image is displayed only when necessary.
- Load large images using asynchronous loading
- Uses the delayed loading policy to implement more intelligent loading methods.
Handout address
Https://skydrive.live.com/redir.aspx? Cid = bb01f26f28894a40 & resid = BB01F26F28894A40! 127 & parid = BB01F26F28894A40! 111
Video address
Http://www.tudou.com/programs/view/HWLDk95bBf8/
Sample Code (asynchronously loading images)
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">