asp.net mvc - Undetectable caching -


i'm web app developer asp.net mvc 5 in server-side , angularjs in client-side. navigation, in client-side, managed module ui-router. in server-side i've configured custom authentication , authorization. when excecute app can see navigation bar many links. in particular, have link named "overview" redirects controller overview.

code client (html):

<a ui-sref="overview">overview</a> 

code client redirect (angular):

.config(function ($stateprovider, $urlrouterprovider) {      $urlrouterprovider.otherwise("home/index");      $stateprovider         .state("overview", {             templateurl: "home/overview",             url: "/overview"         }) 

controller code:

[outputcache(duration=0, nostore=true)] [allowanonymous] public actionresult overview() {     return partialview(); } 

with breakpoint in line "return partialview()" controller code, can see controller returns partial view when click on "overview" in menu app. when click second time, breakpoint not trigger. think it's caching issue.

i have read caching issue can generated: * in server-side. * in client-side. * iis.

i have tried many solutions: in server side use attribute [outputcache]. when read in browser http headers can see

enter image description here

in client side not find solution avoid caching, think ui-router shouldn't cache anything.

as additional measures put in web.config:

<system.webserver>     <caching enabled="false" enablekernelcache="false" /> </system.webserver> 

even, created own custom actionfilterattribute did not work.

i don't know else do.

ps: sorry english

if there other plugin caches templates, solution clean templates , make plugins unusable.. hence solution not good.

to solve problem of html caching should add random query string @ end of html filename... other solutions mentioned non-caching of api responses , not static content (html/js/css files)

to add random query string ur html. either can use modules grunt-cache-busting or gulp-rev or use query string param query-string-cache-busting.

please note datetime/file-hash best cache-busting param


Comments