Instant View Explained

How to create Instant View for my site and other FAQ

4 min read -
Telegram Instant View

What is Instant View?

Instant View is a Telegram feature, which allows users to read articles with ~zero pageload time. This is achieved by caching pages on Telegram servers — without ads, styles and JavaScript.

Only pure HTML, only hardcore 🤘


How does Instant View works

Template — list of rules which tells Telegram server what it must to save and what to remove. Criteria for a good and perfect Template on official site:

Good Template
Perfect Template

How can I get Instant View on my domain

Currently there are 4 ways to get Instant View for your website:

  1. Mimic a Medium page (fastest + easiest)
  2. Mimic a WordPress/Telegraph/Zen etc. (hardest)
  3. Create and use your own Instant View Template
  4. Suggest Telegram to make IV for your site (press “Add Domain”)

How to mimic a Medium page

Original article:

read on nikstar's blog

Once Telegram think your page based on Medium blog platform — it will automatically try to parse it. And if your pages have standart HTML markup — your site will get Instant View You can mimic a Medium page in 2 steps:

⁠1. Add this meta tag in <head>:

<meta data-rh="true" property="al:android:app_name" content="Medium" />

⁠2. Add (if doesn’t exist) this meta tag:

<meta property="article:published_time"/>

⁠3. (optional) Add this to create Join button for your Telegram channel:

<meta name="telegram:channel" content="@CHANNEL_USERNAME"/>

⁠4. (optional) Also you can set up a preview by adding such tags:

<meta property="og:site_name" content="SITE_NAME" />  
<meta property="og:description" content="DESCRIPTION" />  
<meta property="og:image" content="PREVIEW_IMAGE_URL" />  
<meta name="author" content="AUTHOR_NAME" />

Also, content of your page must be placed inside <article> tag.

If it doesn't work
  1. Go to go to My Templates page
  2. Login via Telegram
  3. Enter a URL of your page
  4. Paste this Template

You'll se error which prevents your page from caching on Telegram servers. You can ask your question at Instant View groups: En, Ru or Uz.

UPD (26 April 2020): Instead of Medium <meta> you can use <meta property="tg:site_verification">.

Minimal page structure, however, is a bit different.


How to mimic a WP page

Original article:

read on nikstar's blog

TL;DR: You need to create a mirror of your article on site, which already has Instant View (wordpress.com, telegra.ph, zen.yandex.com etc.) and add a redirect for Telegram Bot on your server:

if ( $http_user_agent ~ 'TelegramBot' ) {
    return 301 https://%username%.wordpress.com$request_uri;
}

Note: you can change site_name property only with Medium and Wordpress, on Telegraph and Yandex Zen site_name is locked.


How to create a Template

WARNING: Currently Telegram rarely accept new Templates. Your Template wouldn’t be automatically applied to links from your website, you’ll need to do this manually (but you still can automate it a bit)

If you know HTML at least a little bit and know how to inspect element on site — you’ll be fine.

First of all, read the Manual, XPath cheatsheet and look at Sample Templates.

After this you can go to My Templates page, login via Telegram and try to write your firstborn Template.

More helpful links 👇🏻

Have an error? Try to put one of error handlers to the end of your Template.

Error Handlers

Didn’t help? You can ask your question at Instant View groups: En, Ru or Uz.


I created a Template, what’s next?

Make sure that your Template can handle all articles with different content on your site, especially with complex ones: slideshows, embed/iframe, captions etc.

If you’ve checked 10+ pages on your site (by click on Track Changes button), you can submit your Template. There are ~0% chance that it’ll be approved and applied to your site automatically.

Press View in Telegram button and get an IV link. It would look like this: https://t.me/iv?url=%YOUR_URL%&rhash=%YOUR_RHASH%

Now you can create Instant View for any article by replacing %YOUR_URL% parameter.

You can also automate it with IFTTT or make link looks pretty using @insvibot.


Can I ask Telegram to create IV for my domain?

Yes, you can and you should. It is simple — just open IV site and press “Add domain”.

And wait.

Nobody knows, when would next contest begun (and would it begun at all), so… Keep optimistic.


And that’s all, folks!

Huge thanks to Nikita, Misho and whole Russian and English Instant View communities!