Question

I'm using to load website follow code

webContent.Navigate(new Uri(linkURL));

I want to cache all content and html tag, style, js in web to read offline.

I tried download html source, file css and js using Webclient and replace these file to html resource then save to file "index.htm" but not good.

Can you find the way to resolve this issue? thank you.

Was it helpful?

Solution

The only way to do this is to download ALL the relevant files (including those referenced inside the HTML. eg. images, css, js, etc.) and save them ALL to Isolated Storage with appropriate similar file and folder structures.

The important point is that you also need to update all the paths within the content so that they point to relative paths that match where files have been saved.

You can then load the HTML from IsolatedStorage.

This is potentially a lot of work. I'd recommend exploring other options if possible first. Also remember to manage the files stored in IsolatedStorage appropriately so you don't just keep adding files there indefinitely.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top