How a browser opens a saved html page

How does a browser open a saved html page? It should run the html file and other files from the hard drive. But how can a browser find a link to other small files? Is the browser changing the link to other small html page files from a URL to a place on the hard drive? How can I do that? I want to do the same in my application. But I could not understand this process.

+3
source share
2 answers

Most browsers store attached resources (style sheets, images, scripts, etc.) in a separate folder with a name after the saved page.

All resource links are then converted to relative links, for example:

<img src="name_of_saved_folder/image.jpg">

name_of_saved_folder HTML.

HTML , , , .

Internet Explorer HTML- 1999 , , , , t , .

, , , wget, . , , , HTML- .

+5

URL-, ( ..) HTML.

, HTML file:///some/directory/page.html, <img src="image.png">, file:///some/directory/image.png.

0

Source: https://habr.com/ru/post/1788975/


All Articles