Home > Web Front-end > HTML Tutorial > Image path problem_html/css_WEB-ITnose

Image path problem_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:17:42
Original
1106 people have browsed it

When using relative paths and absolute paths for image paths in web page creation, will the efficiency (opening time) be the same when opening the web page? Example: Suppose a webpage URL is: www.abc.com/a.htm. Is the efficiency of opening the webpage using www.abc.com/images/1.jpg and images/1.jpg the same as the image path in this webpage?


Reply to the discussion (solution)

This impact can be ignored. Besides, you have to add domain names to all paths. It is not easy to test locally and will not be easy to maintain in the future.

There are many pictures in the webpage, and only absolute paths can be used.

The client browser first tries to download the page and obtain the html.
Then parse the html, and then request the corresponding resources based on the content of the html.

Parsing the tag image path information is the job of the client browser. The speed depends on the client computer. This is the basic job of the browser. I believe that all browser manufacturers have done a good job in this area. Optimize it.

Using relative paths can reduce the page size, thereby reducing page download network traffic... However... this time should be ignored.

Just add /images/1.jpg directly in front of the folder. There is no need to add the domain name

I want to know if there are multiple image paths in the webpage, use www.abc. Will com/images/*.jpg repeatedly parse the domain name www.abc.com every time?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template