javascriptcsswin-universal-apphosted-app

Load local resources in Windows Hosted Web Apps (Project Westminster)


I'm currently packaging a website as a "Hosted Web App" for the Windows Store.

Is it possible to check if JavaScript, CSS and image files are already on the users devices inside the app package? This way a lot of traffic could be saved for files that don't change much after all.

Of course there would need to be a fallback to the hosted files in case the site is being called in a normal browser.


Solution

  • This is something that we're currently investigating and will be enabling more of in the future. Today you are able to access resources from the app package using the ms-appx-web:/// app protocol to load the resource. You can build this into your website code. We do have a security violation issue when your site is using https (as it definitely should) that we're working on resolving.