Home >Web Front-end >HTML Tutorial >Front-end optimization-server-side-reduce Http times_html/css_WEB-ITnose

Front-end optimization-server-side-reduce Http times_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:49:531132browse

All images on the page except content images are modified images. Removing meaningless modified images or replacing the show view effect with CSS is an effective way to reduce the number of HTTP requests.

1: css replacement image

CSS effects such as rounded shadow gradients have been widely supported in the current main browsers, but in the past it was achieved through images These effects, such as rounded corner buttons

Relatively speaking, rounded corner buttons only require one HTTP request, but if a div layer is required to have rounded corners! Previously, the artist cut four corners The pictures are finally completed by us in splicing

, and at the same time we have to avoid inconsistencies caused by compatibility. There are at least 4 HTTP requests here, so effects that can be achieved with CSS are first implemented with CSS.

2: Remove meaningless pictures

Modified pictures are dispensable for conveying information. The biggest optimization is to eliminate pictures! So what you need to do before optimizing is to confirm the design with the designer. Does the design itself

need to use so many pictures? Or it could be more concise.

                                                                                                                                                                                                                          ’ ’ to ’ ’ s ’ ” ” ” ” to  to help me remember and understand.

>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn