Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari --> "Application Cache manifest had an incorrect MIME type: text/plain."

"Application Cache manifest had an incorrect MIME type: text/plain."

Getting the same message again and again yet I get my content cached. Browsers on which I am facing this problem: IE9/10 and Safari. My Mozilla and chrome gives and output fine.

Code:

<script type="text/javascript">
  function logEvent(event) {
      alert(event.type);
  }

  window.applicationCache.addEventListener('checking',logEvent,false);
  window.applicationCache.addEventListener('noupdate',logEvent,false);
  window.applicationCache.addEventListener('downloading',logEvent,false);    
  window.applicationCache.addEventListener('cached',logEvent,false);
  window.applicationCache.addEventListener('updateready',logEvent,false);
  window.applicationCache.addEventListener('obsolete',logEvent,false);
  window.applicationCache.addEventListener('error',logEvent,false);

</script>
like image 376
Wasimakram Mulla Avatar asked Jan 19 '26 13:01

Wasimakram Mulla


1 Answers

MIME type should be text/cache-manifest. This is required on old browsers.

This requirement was dropped from the specification some time ago, and no longer required by the latest versions of Chrome, Safari and Firefox, but you'll need the mime-type to work in older browsers and IE11.

A Beginner's Guide to Using the Application Cache

like image 93
LostInComputer Avatar answered Jan 21 '26 02:01

LostInComputer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!