I have some users not being able to access some templates on my angularjs application when my server responds with status code 304. Angularjs is logging [$compile:tpload]
as you can see bellow and the views are not being shown to the users. So somehow angular is not getting the views from cache. The issue seems to happen very intermittently and the page starts work properly again after a clean browser cache + page refresh.
I'm running Angularjs v1.6.6 with ui-router v0.3.2 and I'm hosting my static files on firebase hosting. Is it something that was fixed on latest versions? Otherwise, how should I handle this case?
[$compile:tpload] http://errors.angularjs.org/1.6.6/$compile/tpload?p0=%2Fjs%2Ftemplate1%template1.html&p1=304
Possibly unhandled rejection: {"data":"","status":304,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","cache":{},"headers":{"Accept":"text/html"},"url":"/p/p.html"},"statusText":"","xhrStatus":"complete"}
Caught Request/Response using LogRocket
URL: "https://url.com/js/p/a/template.html"
method: "GET"
status: 304
duration: "00:00.061"
REQUEST
headers
Accept: "application/json, text/plain, */*"
body: null
credentials: ""
mode: ""
referrer: ""
RESPONSE
headers
cache-control: "max-age=3600"
date: "Sat, 15 Sep 2018 20:03:12 GMT"
etag: ""f166a7577a895x3f7dcc5accae97dcba""
expires: "Sat, 15 Sep 2018 17:45:33 GMT"
vary: "Accept-Encoding"
via: "1.1 varnish"
x-cache: "HIT"
x-cache-hits: "1"
x-served-by: "cache-bma1622-BMA"
x-timer: "S1537041792.121483,VS0,VE1"
body: ""