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?
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?