Home > Mobile >  JSSDK jsapi_ticket mechanism in signature?
JSSDK jsapi_ticket mechanism in signature?

Time:11-26

according to the public official description:
Jsapi_ticket
Generate signature must first understand the jsapi_ticket, jsapi_ticket are used to invoke the number public WeChat JS interface of temporary paper,
Under normal circumstances, the validity of the jsapi_ticket is 7200 seconds, get through access_token,
Due to obtain jsapi_ticket API call number is very limited, frequent refresh jsapi_ticket leads to limited API calls, affect their business, developers must serve in their global cache jsapi_ticket

But actual tests, I found the following
The following is a figure 1

Here is figure 2 after the refresh, refresh interval 1-2 seconds

1, the access_token change over time and different, as shown in figure, the blue part,
2, jsapi_ticket no change, as shown in figure, the red part,

The understanding about jsapi_ticket, I
If use the access_token to public API for jsapi_ticket, then the public will automatically generate a new jsapi_ticket,
(so you need to do in their server "cache")
But tests found that two different access_token, is the same jsapi_ticket,

That... Jsapi_ticket automatically cached on public number? Don't need in your own server cache?
In addition, I see in public, the background, even constantly refresh jsapi_ticket unchanged, the same is in counting,
  • Related