Saving hypertext documents by various browsers


    The topic of “curvature” of browsers is often raised, in this topic I propose to consider the browser not from the point of view of the user's visual agent, but as a “black” box, one document is input to it, and another is output (after saving).

    Input data


    In order not to be like in the saying “What watered it grew”, we will submit a valid XHTML 1.0 Strict document, a stylesheet, and one PNG image to the input.

    sample.html sample.css


    image.png


    An


    archive with these files can be downloaded here .

    Experimental technique


    1. Open the file from the hard drive in the browser
    2. Save
    3. We look at what happened
    All the browsers were the latest release versions at the time of the experiment (a couple of weeks ago).

    results


    Opera



    The file remains a valid XHTML 1.0 Strict document. At the end is added a line from where the document was saved.
    CSS and PNG are neatly folded in a separate folder.
    There is nothing to complain about.

    Firefox



    The file ceased to be valid (5 errors on validator.w3.org) - did not close the meta and link tags.
    CSS saved, forgot about PNG - background lost.

    Chrome



    The file ceased to be valid (18 errors on validator.w3.org) - left the document type, but converted all the tags to upper case. Meta and link are not closed, i.e. you might think that Chrome tried to save the document in the good old HTML 4.01. After DOCTYPE I added a comment from where the page was saved.
    CSS saved, forgot about PNG.

    Internet explorer



    The file is no longer valid (4 errors on validator.w3.org). Changed DOCTYPE to HTML 4.0. He brought all the tags to upper case, meta and link are not closed. Added a "from myself" meta tag. After DOCTYPE I added a comment from where the page was saved.
    CSS saved, forgot about PNG.

    My development environment :)


    Valid code




    Invalid code




    Conclusion


    Only Opera did the job “excellently”, the rest took up all kinds of “amateur activities”, which led to the fact that the saved document will not be displayed similarly to the original one.
    Chrome, FF, IE - get a “deuce” for not saving a picture from CSS.
    Also, if I’m not mistaken, of all the browsers listed above, only Opera has the item “Do you comply with web standards” in the context menu.

    I hope this topic will attract the attention of browser developers and they will make their creations preserve beautiful, valid documents.

    Also popular now: