{"id":17109609,"url":"https://github.com/monken/js-appcachemanager","last_synced_at":"2026-01-05T05:37:55.625Z","repository":{"id":8239042,"uuid":"9682209","full_name":"monken/js-appcachemanager","owner":"monken","description":null,"archived":false,"fork":false,"pushed_at":"2013-04-26T01:00:04.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T05:13:39.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-25T21:53:07.000Z","updated_at":"2013-10-19T18:37:33.000Z","dependencies_parsed_at":"2022-08-06T23:01:08.465Z","dependency_job_id":null,"html_url":"https://github.com/monken/js-appcachemanager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monken%2Fjs-appcachemanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monken%2Fjs-appcachemanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monken%2Fjs-appcachemanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monken%2Fjs-appcachemanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monken","download_url":"https://codeload.github.com/monken/js-appcachemanager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245175323,"owners_count":20572781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T16:23:47.558Z","updated_at":"2026-01-05T05:37:55.596Z","avatar_url":"https://github.com/monken.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## AppCacheManager\n\nManaging multiple cache manifests on a single page using IFrames.\n\n### Synopsis\n\n````javascript\nvar appCache = new AppCacheManager({\n  manifests: [\"assets\", \"images\", \"i18n.en\"]\n});\n\n// the AppCacheManager aggregates the individual applicationCache events\n// following the rules from http://www.w3.org/TR/2011/WD-html5-20110525/offline.html#appcacheevents\n$(appCache).bind(\"cached\", function() { /* ... */ });\n````\n\n### Why\n\nAuthors can provide a manifest which lists the files that are needed for the Web application to work offline and which causes the user's browser to keep a copy of the files for use offline.\nThere are, however, a few caveats that limit the usability of this feature:\n\n* One manifest per document\n\n* Each document maintains its own cache\n\nEven if two documents reference the same manifest file, a separate cache for each document is created.\n\n* A change to the manifest file causes all assets to be requested\n\nIf the browser detects a change to the manifest file, all files listed are requested from the server with a `If-Modified-Since` header. Depending on the number of files, this will take a considerable amount of time.\n\n* No dynamic loading of manifests\n\nThere is no way to programmatically run the caching process and no way to specify the manifest dynamically.\n\n### How\n\nThis class tries to solve these issues by providing an abstraction between the web site and the offline storage layer provided by the browser.\nInstead of stuffing all files in a single manifest file, the offline content can be sliced and diced on a per subject basis. Imagine a news site that wants to make all its articles available for offline reading. The obvious solution is to put every article including images and assets in a single manifest file. This will cause several issues. Adding a new article to the manifest file will cause the client's browser to request all items to be requested with a Modified-Since-Header. While this won't cause too much traffic, it will takes ages to complete all requests and your server has to handle a huge amount of requests at the same time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonken%2Fjs-appcachemanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonken%2Fjs-appcachemanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonken%2Fjs-appcachemanager/lists"}