angularjs - Deploying ASP.Net MVC, Angular application download file when there is a change -


I have an ASP.NET application that uses Angular JS, Javascript, HTML5. The problem is that when I can cache some files to the browser, which results in errors, because the user is not getting the latest HTML and JavaScript files.

I know that there is a MANIFEST file in HTML 5 that can force the file to download; the file has actually been replaced when a more efficient way to download the file is?

I understand that this is not just for javascript files, which are not HTML files?

I am not sure that it is swaped using the related angulas as a number of these HIL files using ng-visual and templates.

Any clue will be appreciated.

I am trying to use bundles, but do not make sure it applies to html files using angulars

thanks

updated answer

I'm not sure that this angle is related because many HIL files are ng-visons And are swapping using templates.

The number of bundling decreases. Request for the server For AngularJS, you can use a technique at build time to inline the template with Javascript. This is a plugin for Grunt Based Build System

Now you can use bundles for JS.

Other options are around the browser caching and do not even worry about bundling the template. Grunt-based based builds a good cache-finish mechanism described below, I'll give you the caching options and some important points below I look forward to seeing. Caching options are set at the web server level.

Thumb rule Do not cache the first page (index.html) or cache with the if-modified header

Referenced resources

Use the Grunt-based Build and Plugin

The way this plug-in works, it is that every resource that is referenced in HTML And will rename the file with the file. HASH Ensure that its references have also been updated. It's smart enough to ignore the CDN based remote url.

If the customer does not send you a request, then you can not do anything to the server

The HTML5 cache manifest does not work on all browsers (IE & lt; = 9: () < / P>


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -