sonam
sonam

Reputation: 905

Why does IE11 send 'pragma: no-cache' in request header for ajax requests?

I am testing my web page on IE11. I am making some ajax calls and setting response headers as

Cache-Control: private, max-age=21600;

Though everytime making a request, IE11 sets Pragma:no-cache request header. Causing request to get served from origin, though it should have been present in cache.\

Why does IE do that? Is there any way in IE to ignore this header?

Thanks.

Upvotes: 7

Views: 5066

Answers (2)

Jordan H.
Jordan H.

Reputation: 457

You can turn that off when the tools are open by deselecting the circled button:

IE Network Tools

Upvotes: 10

Jim
Jim

Reputation: 16022

I have tracked this down using Fiddler. It's a red herring. IE11 only sends the praga:no-cache header when the development tools are open.

If you press F12 and close the development tools you will find that the no-cache header is not actually sent on each request. If you just have the development tools open, the no-cache header is sent.

You can check it out using fiddler.
Hope it helps...

Upvotes: 15

Related Questions