Skip to main content

Tips and Tricks

On this page, you'll find a list of frequently asked questions related to issues in TMA.

How to solve the cache overflow issue in TMA?

tip

Only reinstalling the Telegram application could be helpful.

Are there any recommendations on caching headers for HTML files?

tip

It's preferable to switch off cache in the HTML. To ensure your cache switched off, specify headers in your request according the following:

Cache-Control: no-store, must-revalidate
Pragma: no-cache
Expires: 0

What is suggested IDE for development TMA?

The process of development in Google Chrome more convenient because of the familiar dev tools.

You can retrieve the launch parameters of the mini-app and open this link in Chrome. For our case, the easiest way is to retrieve the launch parameters from the web version of Telegram: https://web.telegram.org/

Closing Behaviour

In many web applications, users might accidentally close the app while scrolling to the top. This can happen if they drag a section of the application too far, inadvertently triggering the app to close.


closing_behaviour_durgerking

To prevent such accidental closures, enable closing_behavior in the TMA. This method will add a dialog where the user can either approve or decline the closing of the Web App.

window.Telegram.WebApp.enableClosingConfirmation()

How to specify a description for a certain language in the TMA?