0

I have an AngularJS application where I am trying to implement download functionality in png/jpeg format.The download is not dependent on backend server.Basically we take the screenshot of current data which is displayed to the user and downloads the same in selected format.SO all of it is handeled in frontend itself. This feature works fine in Chrome and Firefox browsers but in IE 11 when I try to download I am getting warning as

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

and I feel may be because of this warning only my download is not working. I read somewhere that AngularJS by default blocks back and forward caching. So I added below code:

var myApp = angular.module('myApp', ['ngRoute']);

myApp.config(['$routeProvider', '$httpProvider', function($routeProvider, $httpProvider) {
    $httpProvider.defaults.cache = false;
    if (!$httpProvider.defaults.headers.get) {
      $httpProvider.defaults.headers.get = {};
    }
    // disable IE ajax request caching
    $httpProvider.defaults.headers.get['If-Modified-Since'] = '0';
    //.....here proceed with your routes`
}]);

But still no change. Appreciate any pointer.

  • Look at [here](https://stackoverflow.com/questions/21920864/form-javascript-not-working-on-ie-11-with-error-dom7011?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa) a similar issue – Sudhir Ojha May 18 '18 at 12:21
  • @SudhirOjha This link is not useful in my case. My download doesnt depend on server. Its all done in frontend itself. Basically i get a screenshot of what is displayed on the screen of the user(in my case graphs) and then it gets downloaded in any of the selected format. – Chetna Gupta May 21 '18 at 08:12

0 Answers0