{"id":37001804,"url":"https://github.com/meanbee/magento2-serviceworker","last_synced_at":"2026-01-14T00:24:03.114Z","repository":{"id":16738136,"uuid":"80536763","full_name":"meanbee/magento2-serviceworker","owner":"meanbee","description":"Service Worker extension for Magento 2","archived":false,"fork":false,"pushed_at":"2022-04-26T14:23:53.000Z","size":130,"stargazers_count":51,"open_issues_count":7,"forks_count":27,"subscribers_count":11,"default_branch":"master","last_synced_at":"2023-07-15T10:46:00.140Z","etag":null,"topics":["magento2","magento2-extension","pwa","service-worker"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meanbee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-31T16:09:47.000Z","updated_at":"2022-10-13T14:43:53.000Z","dependencies_parsed_at":"2022-07-26T09:02:05.606Z","dependency_job_id":null,"html_url":"https://github.com/meanbee/magento2-serviceworker","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"purl":"pkg:github/meanbee/magento2-serviceworker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanbee%2Fmagento2-serviceworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanbee%2Fmagento2-serviceworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanbee%2Fmagento2-serviceworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanbee%2Fmagento2-serviceworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meanbee","download_url":"https://codeload.github.com/meanbee/magento2-serviceworker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meanbee%2Fmagento2-serviceworker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["magento2","magento2-extension","pwa","service-worker"],"created_at":"2026-01-14T00:24:02.424Z","updated_at":"2026-01-14T00:24:03.097Z","avatar_url":"https://github.com/meanbee.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meanbee_ServiceWorker\n\nA Magento 2 extension that adds [Service Worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) support.\n\nFeatures:\n* Fully customisable Service Worker script\n* Cache-first approach for page assets resulting in faster page loads\n* Offline cache for CMS and catalog pages allowing viewing previously visited pages while in poor network conditions\n\n## Installation\n\nAdd this extension to your Magento installation with Composer:\n\n    composer require meanbee/magento2-serviceworker\n\n## Usage\n\n### Configuration\n\nThe Service Worker is configured and enabled by default. However, Service Workers require the site to run on HTTPS.\n\nFeatures can be customised in *Stores \u003e Configuration \u003e General \u003e Web \u003e Service Worker Settings*.\n\n### Adding more logic\n\nIf the base service worker file doesn't fit all of your needs you can easily add more logic using the layout system, targeting the `serviceworker_index_js` handle:\n\n    \u003c?xml version=\"1.0\"?\u003e\n    \u003cpage xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View/Layout/etc/page_configuration.xsd\"\u003e\n        \u003cbody\u003e\n            \u003creferenceBlock name=\"serviceworker\"\u003e\n                \u003cblock class=\"\\Meanbee\\MoreLogic\\Block\\Logic\" name=\"morelogic.logic\" template=\"Meanbee_MoreLogic::logic.phtml\" /\u003e\n            \u003c/referenceBlock\u003e\n        \u003c/body\u003e\n    \u003c/page\u003e\n\n## FAQ\n\n### Why do page assets not appear to be cached when Magento is in default/developer mode?\n\nMagento 2 uses a timestamp version string in the URL for static files to allow busting browser cache when the static content gets updated. In developer mode, this version string is updated for every unique page request. This means that from the browser's perspective, the static assets, such as CSS files, are completely different on each page, even though the content is the same. Therefore, when the assets get cached by the Service Worker in Magento 2 developer mode, they only get cached for that specific page. Production mode only generates the static assets through command line and keeps the version timestamp fixed, so it doesn't experience this issue.\n\n## Development\n\n### Setting up a development environment\n\nA Docker development environment is included with the project:\n\n    docker-compose run --rm cli magento-extension-installer Meanbee_ServiceWorker \\\n    \u0026\u0026 docker-compose up -d\n\n### npm dependencies\n\nThe extension uses npm to manage some of its web dependencies. Dependencies are installed and updated using npm, then\ncopied into the `src/` directory using an npm script. To update the web dependencies, run:\n\n    docker-compose run --rm node npm update\n    docker-compose run --rm node npm run build\n\n### Testing Service Workers on Chrome\n\nChrome is very strict about security and only allows Service Workers on localhost, or on an HTTPS site with a valid certificate. To bypass these restrictions for testing, use the `--ignore-certificate-errors` and `--unsafely-treat-insecure-origin-as-secure` flags to run a less secure copy of Chrome:\n\n    /Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome \\\n        --user-data-dir=/tmp/chrome \\\n        --ignore-certificate-errors \\\n        --unsafely-treat-insecure-origin-as-secure=https://m2-meanbee-serviceworker.docker/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeanbee%2Fmagento2-serviceworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeanbee%2Fmagento2-serviceworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeanbee%2Fmagento2-serviceworker/lists"}