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

Add preload, mayLaunchUrl, preFetch , warmUp apis. #210

Open
Satendra9984 opened this issue Oct 25, 2024 · 4 comments · Fixed by #211, #212, #215 or #220
Open

Add preload, mayLaunchUrl, preFetch , warmUp apis. #210

Satendra9984 opened this issue Oct 25, 2024 · 4 comments · Fixed by #211, #212, #215 or #220
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Satendra9984
Copy link

As part of the optimization for CustomTabs these methods are needed for pre-optimizations for the custom-tabs.

preload : Load the url in a custom-tab in advance through this method so that when cutom tab is opened it is more faster to load webpage.

mayLaunchUrl : Can check and pre-establish connections like DNS, TLS, TCP etc. and what are needed by browser.

preFetch : Load the webpage in advance like an http.get request so that some static content and dns, tls, tcp are cached .

warmUp : To open the browser in advance for custom tabs.

As we need CustomTabs because we want to customize and improve the URL launching experience or else we can use the normal url_launcher so for the further optimization and better url opening experience these methods are required.

Please share your thoughts.

@droibit
Copy link
Owner

droibit commented Nov 5, 2024

Thank you for your proposal regarding optimization options for flutter_custom_tabs plugin.

I agree that providing these optimization features could enhance the user experience by improving the performance of Custom Tabs.
Based on the functionalities provided by the platform implementations, here's how the support looks:

OS(Implementation) preload mayLaunchUrl preFetch warmUp
Android(Custom Tabs) - - ✔︎ ✔︎
iOS(SFSafariViewController) - ✔︎ - -
  • ✔︎: Implementable
  • -: Not planned (feature not provided by platform implementation)

I plan to start implementing the following optimization features in the plugin:

  • warmUp : Android only
  • mayLaunchUrl:
    • iOS: Use the mayLaunchUrl functionality provided by Custom Tabs.
    • Android: Use the preFetch functionality provided by Custom Tabs.

Since the flutter_custom_tabs interface is based on Custom Tabs,
I intend to implement these features under a unified mayLaunchUrl function.

Please note that because these features are implemented differently on each platform,
it may take some time to design a unified interface that provides a consistent experience.

@droibit droibit self-assigned this Nov 5, 2024
@droibit droibit added the enhancement New feature or request label Nov 5, 2024
@droibit droibit added this to the 2.2.0 milestone Nov 5, 2024
@droibit droibit mentioned this issue Nov 5, 2024
@Satendra9984
Copy link
Author

Thanks for taking the suggestion I will wait for these implementations.

@droibit
Copy link
Owner

droibit commented Nov 27, 2024

I have released the first version supporting performance optimization features, 2.2.0-dev.1.

Please feel free to provide feedback.

@Satendra9984
Copy link
Author

Thanks for adding these features. I will now use it is in my app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment