Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

destroy status of a miniapp expected? #35

Closed
espinr opened this issue Sep 9, 2022 · 2 comments
Closed

destroy status of a miniapp expected? #35

espinr opened this issue Sep 9, 2022 · 2 comments

Comments

@espinr
Copy link

espinr commented Sep 9, 2022

During the privacy review, we are asked to clarify the concept of a mini app "session". Since the answer is related to the lifecycle, I wonder how we can define a session regarding app statuses and events.

The concept of a session I'm referring to is the period starting when the app is loaded (after initialization) and finishing when it is destroyed (cache information is removed).

I did a comparison among the different mini app vendors at w3c/miniapp-manifest#56 .

Could we specify anything to clarify when a app is unloaded?

@QingAn
Copy link
Contributor

QingAn commented Oct 20, 2022

@espinr Thanks for the comparison analysis

Open for discussion: which way we prefer?

  1. specify a MiniApp destroyed event and interface
  2. simply include text to clarify when the MiniApp and its cached information is destroyed

@espinr
Copy link
Author

espinr commented Oct 27, 2022

In the case of quick apps, there is a specific destroy event whose handler can be used to clean up connections and notify the system that this app is no longer available. For instance, it is used for unsubscribing to system messages (that can be received from other apps).

Perhaps we can implement a destroy or unload (as included in the page lifecycle) status. This event would mark the end of the session, and the removal of all the temporary resources from the cache. This state is already mentioned in the explainer.

I also understand that most MiniApp user agents perform this removal once the platform meets some criteria (inactivity and/or allocation of resources in the background). The criteria may vary depending on the implementations, so we could specify that the platform SHOULD/MUST terminate the app's execution based on these criteria (to be determined by the concrete implementation).

QingAn added a commit that referenced this issue Dec 2, 2022
@espinr espinr closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants