ajax - chrome browser not sending 'If-None-Match' for xhr -
i'm using angular service resource via rest api. server sets etag
header value , sets cache-control: no-cache
in it's response.
this works expected using firefox, when access same app using chrome, not sending if-none-match
. i've tried on current chrome dev , stable channels on both mac , ubuntu box, , same on both, while firefox adding if-none-match
correctly.
now, there other non-xhr/static resources fetched conditionally , requests correctly 304 not modified
response.
is there can more information why chrome not sending if-none-match
header xhr requests?
if you're issuing ajax query in chrome on https, certificate errors, such using self-signed cert on api server, prevent response being cached. seems design.
evidently chrome defect existed fixed in webkit , made chromium / chrome around 2010.
another question recommends setting if-modified-since , if-none-match headers manually using jquery's ifmodified: true , cache: true options. unfortunately won't over-ride chrome's intended behavior not cache https responses server self signed certificate.
testing on server valid signed ssl certificate solved issue me; chrome received 304's text/html content expected, using default jquery ajax methods.
Comments
Post a Comment