Skip to content

Commit

Permalink
Merge pull request #400 from 552020/patch-4
Browse files Browse the repository at this point in the history
Rephrase ## Transmission Method in launch-parameters.md
  • Loading branch information
heyqbnk authored Jul 10, 2024
2 parents 42d4d19 + f29df9a commit 6f38407
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions apps/docs/platform/launch-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ the current device, get basic information about the user and much more.

## Transmission Method

It's easy to guess, but in a web environment, one of the simplest and most instantaneous ways to
transfer data in a local environment is to specify them in the address bar of the application. Thus,
both the called server and the downloaded application will have some pre-known data. Actually,
Telegram Mini Apps technology uses the same algorithm.

The native Telegram application transmits a list of these parameters in the dynamic part of the
URL (in the hash, `#`). Accordingly, in order to access these parameters, it is necessary to access
the `window.location.hash` property from the JavaScript code.
In a web environment, one of the simplest and fastest ways to transfer data between locally running
applications is by specifying it in the address bar. A server can include data in the URL's hash,
making it accessible to the client application. Similarly, Telegram Mini Apps use this approach, with
the Telegram client environment sending data to the Mini App through the URL's hash. This enables
the Mini App to access essential information upon launch.

The native Telegram application transmits a list of these parameters in the dynamic part of the URL
(in the hash #). To access these parameters, you need to use the window.location.hash property in your JavaScript code.

## Extraction

Expand Down

0 comments on commit 6f38407

Please sign in to comment.