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

[Feature] Save webpage to local #366

Closed
c86jeff opened this issue May 27, 2020 · 13 comments
Closed

[Feature] Save webpage to local #366

c86jeff opened this issue May 27, 2020 · 13 comments
Labels
enhancement New feature or request

Comments

@c86jeff
Copy link

c86jeff commented May 27, 2020

Is there any way to save web page to local and then could load local material from webview?
Does flutter have the mechanism to support such feature ? if yes, i could do some contributions.

@pichillilorenzo
Copy link
Owner

Android has the saveWebArchive() method that will be available in the next release.
For iOS, this could be a hint: https://stackoverflow.com/questions/36246495/swift-ios-cache-wkwebview-content-for-offline-view

@pichillilorenzo pichillilorenzo added the enhancement New feature or request label May 28, 2020
@c86jeff
Copy link
Author

c86jeff commented May 29, 2020

@pichillilorenzo thats cool! if you need help, call me

This was referenced Jul 6, 2020
@rebootcode
Copy link

Any update on it? it's quite a great option.

@easazade
Copy link

this is a very needed feature for webview apps

@rebootcode
Copy link

@easazade - They are - I just hope someone from the community looks into this feature and sends PR to @pichillilorenzo

@pichillilorenzo
Copy link
Owner

Web archive support added also on iOS starting from version 5.

@E2-Pavithran
Copy link

E2-Pavithran commented Aug 26, 2021

@pichillilorenzo Thanks for adding Web archive support to iOS. I have a quick question on this,

I was implementing a feature something like saving the web pages into the app directory and displaying it next time without loading from the network.

And so far the only option I could see is the "saveWebArchive" method in the web view controller. It successfully saves the web page in the form of .mht / .webarchive.

But it is not downloading the resources Ex: images and dynamic contents view like pressing a button to open a pop-up on the web page. So when I load it from the app directory using "file://" only the static contents are displaying even though it has internet at the time of loading.

Please look at the example attached result samples for the web page "https://www.apple.com/in/"
Sample.zip.

When I open the .mht file using chrome only I could see the static content, but safari handles it quite cleverly when it has internet it loads the additional resources as well using the .webarchive file.

I am just calling the "saveWebArchive" in the "onLoadStop" method of web view callback.

Can you please suggest to me, if there is something to display the dynamic contents as well from the saved archive file when the device has an internet connection? (It's okay to display the static content when the app doesn't have access to the internet).

@Knaackee
Copy link

@E2-Pavithran did you solved the problem?

@Dancas93
Copy link

@E2-Pavithran any update on that?

@marcelomoresco
Copy link

update?

@iKK001
Copy link

iKK001 commented Jan 26, 2024

any update ?

@Its-NK
Copy link

Its-NK commented Jul 30, 2024

is the offine save added for android platforms ?

Copy link

github-actions bot commented Oct 3, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

10 participants