HTML5 Application Cache Implementation Issue on Tizen 3.0 Smart TV

Original Created May 01, 2018 | Regeneration Apr 22, 2026

I'm developing for Tizen 3.0 Smart TV and trying to cache some images and JavaScript files using HTML5 Application Cache. My test setup includes:

  1. demo.appcache file:
CACHE MANIFEST
#VERSION 1.0.0
CACHE:
cache_test.js
  1. index.html:
<!DOCTYPE html>
<html manifest="demo.appcache">
<head>
    <title>APPCACHE TEST</title>
</head>
<body>
    <script src="cache_test.js"></script>
</body>
</html>

However, when I run this, the manifest file doesn't seem to be linked properly. When I try to execute applicationCache.update() from the console, I get the error "there is no application cache to update."

Could you provide guidance on implementing application cache correctly in Tizen Smart TV applications?

Problem Understanding

The issue occurs when the application cache manifest isn't being properly recognized by the Tizen browser. This could be due to:

  1. Incorrect file paths in the manifest
  2. Missing MIME type configuration
  3. Browser-specific implementation differences

Solution Methods

  1. Path Correction:

    • Update the manifest file to use explicit paths:
      CACHE MANIFEST
      #VERSION 1.0.0
      CACHE:
      ./cache_test.js
      
  2. Cache Status Verification:

    • Check the current cache status using this JavaScript code:
      var appCache = window.applicationCache;
      
      switch (appCache.status) {
        case appCache.UNCACHED: // 0
          console.log('UNCACHED');
          break;
        case appCache.IDLE: // 1
          console.log('IDLE');
          break;
        case appCache.CHECKING: // 2
          console.log('CHECKING');
          break;
        case appCache.DOWNLOADING: // 3
          console.log('DOWNLOADING');
          break;
        case appCache.UPDATEREADY: // 4
          console.log('UPDATEREADY');
          break;
        case appCache.OBSOLETE: // 5
          console.log('OBSOLETE');
          break;
        default:
          console.log('UNKNOWN CACHE STATUS');
      }
      

Additional Tips

  • Ensure your web server serves the .appcache file with the correct MIME type: text/cache-manifest
  • Remember that applicationCache.update() is used to re-download cached data, not for initial cache setup
  • Consider using Service Workers as a more modern alternative to Application Cache, as it's being phased out in favor of Service Workers

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.