Search code examples
angularinternet-explorerangular7

DOM7011: The code on this page disabled back and forward caching


I'm testing my Angular app on IE 11 and unfortunately, it shows a bank page, I've un commented necessary lines in polyfills file and I can see login page, but even entering the right credentials, the response is 200 ok and I got the required info to login but it doesn't redirect to home page, and I can see this msg in console DOM7011: The code on this page disabled back and forward caching. it's not an error

I read a lot on stackoverflow and know that this question has been asked before, but none of suggested ideas work with me the app works fine in all browsers like (chrome, firefox, Edge, opera) Any suggestion is much appreciated


Solution

  • The issue was in login component when get the credentials and navigate to home page, but it seems that it didn't work in IE, so the solution was to replace this.router.navigate(['/']); by this.router.navigate(['/home']);

    The second one, IE doesn't explore Date.parse, it gives different results in chrome and IE, so I replace it also.