41

The register button for our ASP.net form, which uses the __postback function stopped working on IE 11, from the developer console, it shows:

DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337.

Does anyone know how to get around with this? What is this caching thing and why does it mess up forms. I seen similar complaints about this from others.

Dale K
  • 25,246
  • 15
  • 42
  • 71
eastboundr
  • 1,857
  • 8
  • 28
  • 46

9 Answers9

5

This issue occurs if the server sends a "Cache-control:no-store" header or sends a "Cache-control:no-cache" header.

John R Perry
  • 3,916
  • 2
  • 38
  • 62
  • I got this when my page sent "Cache-Control: public, max-age=0". I'm assuming it's because of the `max-age=0`. – trysis Aug 14 '15 at 14:22
  • 40
    what is the solution ?? – Irfan Y Jan 30 '16 at 18:15
  • 4
    This answer is the explanation of the problem but the solution? – Suhas Kulkarni Oct 05 '17 at 15:24
  • The server is sending a Cache-control header, so the best solution is to change the server. Secondarily, you may be able to make a different request for the same content. For example, add `"?random=" + Math.random()` to each of your links. – Nathan Strutz May 04 '18 at 17:01
1

I have seen exactly the same error, also with IE11. In my case the issue occurred when user clicked <button> element, which was inside <form> tags.

The issue was remedied, by placing the <button> outside of <form> tags.

Matilda Smeds
  • 1,384
  • 11
  • 18
1

This error occurred for me when using window.location.reload(). Replacing with window.location = window.location.href solved the problem.

Dale K
  • 25,246
  • 15
  • 42
  • 71
RationalRabbit
  • 1,037
  • 13
  • 20
1

I faced the same issue before. I cleared all the IE caches/browsing history/cookies & re-launch IE. It works after caches removed.

You may have a try. :)

Huey
  • 11
  • 1
0

In my case, this exception was being caused by an unsecure ajax call on an SSL enabled site. Specifically: my url was 'http://...' instead of 'https://...'. I just replaced it with '//...'.

To me, the error was misleading, and hopefully this may help anyone landing here after searching for the same error.

tr3v
  • 431
  • 1
  • 9
  • 19
0

I run into this when click on a html , it is fixed by adding type = "button" attribute.

Feng Zhang
  • 1,698
  • 1
  • 17
  • 20
0

I got the same console warning, when an ajax request was firing, so my form was also not working properly.

I disabled caching on the server's ajax call with the following response headers:

Cache-Control: no-cache, no-store, must-revalidate
Expires: -1
Pragma: no-cache

After this, the form was working. Refer to the server language (c#, php, java etc) you are using on how to add these response headers.

tno2007
  • 1,993
  • 25
  • 16
0

I had a similar problem on Internet Explorer, and got the same error number. The culprit was an HTML comment. I know it sounds unbelievable, so here is the story.

I saw a series of 6 articles on the Internet. I liked them, so I decided to download the 6 Web-Pages and store them on my Hard Drive. At the top of each page, was a couple of HTML <a> Tags, that would allow you to go to the next article or the previous article. So I changed the href attribute to point to the next folder on my Hard Drive, instead of the next URL on the Internet.

After all of the links had been re-directed, the Browser refused to display any of the Web-Pages when I clicked on the Links. The message in the Console was the Error Number that was mentioned at the top of this page.

However, the real problem was a Comment. Whenever you download a Web-Page using Google Chrome, the Chrome Browser inserts a Comment at the very top of the page that includes the URL of the location that you got the Web-Page from. After I removed the Comment at the top of each one of the 6 Pages, all of the Links worked fine ( although I continued to get the same Error Message in the Console. )

Crusty
  • 66
  • 5
-5

Go to

Tools > Compatibility View settings > Uncheck the option "Display intranet sites in Compatibility View".

Click on Close. It may re-launch the page and then your problem would be resolved.

Wanna Coffee
  • 2,742
  • 7
  • 40
  • 66