Take a screenshot of the site yourself and give it to others

    I will be brief. There are a lot of services and features that need screenshots of other sites, these are various directories, rating checkers in search engines, thumbnails previews in tooltips, etc. In the general case, something refers to the site, loads its page, somehow generates a screenshot and passes it to the requestor. Nowadays, third-party services are most often used, which can be accessed using a specially formed url and get a screenshot of the site in response.

    But why not make all this easier, more economical and predictable?

    Screenshot generators often do not show previews right away, because I don’t want to download at all. Screenshots are often taken once a day, a month, or even for years they get stuck in all sorts of caches, and webmasters can not affect the situation. I suggest site owners to take screenshots of sites on their own and give them to people.

    The scheme is as follows. The webmaster manually or programmatically generates a screenshot of the site in the form that it sees fit and puts it in http access, indicating that the screenshot is a special meta tag. To do this, you can use the existing LINK tag, in the manner of favicon:



    Here
    • rel = "screenshot" - an indication of the type of meta information
    • type = "image / jpeg" - mime-type of the resource
    • title = "Title" - the name for the site (or screenshot)
    • href = " ... / screenshot.jpeg " - screenshot url
    The tag is added to the HEAD section of the document, along with other meta tags that indicate other resources related to the page - css, favicons, etc. To get a screenshot, just select the contents of the href parameter and load the file (or display it in the img tag), taking into account its mime -type specified in the type parameter (after all, a screenshot can be made in jpeg, and in png, and in svg).

    pros

    • CPU savings
    • The “correct” screenshot (or a separate screenshot with rel = “speed dial”) gets to the speed dial of browsers
    • The webmaster can take the correct screenshot, in his opinion
    • Screenshot can be up to date, up to real time
    • On a dynamically generated screenshot, you can display some information that people will see on other sites
    • Screenshot generators will be able to directly download the finished screenshot
    • For different tasks, you can display different screenshots by parameterizing the screenshot url
    Minuses

    • It is unclear what size and format (4: 3 or 16: 9) the screenshot is better to palm off. With favicons somehow easier.

    Criticism required.

    Also popular now: