I am using the Windows Forms WebBrowser control to display a web application that I am also writing. The Web Application is using the HTML5 Cache Manifest functionality which I have got working fine when I call the page up in Chrome and IE (V11). However when I test the Cache Manifest in my WebBrowser control it does not work.
My understanding is that the WebBrowser control uses the latest local instance of IE for rendering/processing - however it does not like the Cache Manifest functionality. My cache manifest (cache.appcache) file contains the following:
CACHE MANIFEST
#V1.6
CACHE:
Default.aspx
NETWORK:
FALLBACK:
Error.aspx
and the rest of the project is pretty standard.
I did have to update the MIME of IIS to recognize the appcache extension and this has been cast as: text/cache-manifest
Any help anyone can give on this would be massively appreciated! I have looked at the possibility of using other Web Broswer controls in the project but really want to keep things as simple as possible... if possible!
Thanks!
Got it! for anyone else that might need some help with appcache inside a .net webcontrol.
below code is a sample I was testing with. the code covers the aspx page, javascript, webconfig and appcache file.
the javascript also has some event handlers to display its progress.
the meta tag in the aspx page was a key player - without it, it just didn't work.
don't forget, the nature of appcache is to download the changes the 1st time you visit the site, then display changes on the next visit.. you can intercept any changes and display automatically via the event handlers if you wish.
also something else that caught me, avoid using localhost to visit the page, (only seems to be a problem in chrome), the appcache doesn't seem to work the same way.. you really want to use an IP address: eg: don't use: http://localhost/web/index.aspx use: http://10.1.1.4/web/index.aspx
one last thing - filename case sensitivity! I noticed that the appcache contents relies on exact case - so i just made sure all my files are in lowercase. (appcache file, aspx, js, images, everything!)
hope it helps - good luck all!