This WordPress plugin provides a method for caching theme assets via a service worker.
Перейти к файлу
Marco Castelluccio fa0fafa9da Localize cache-network-race field description 2016-03-14 11:51:57 +00:00
assets Update readme to include screenshot information 2016-03-11 09:58:57 -06:00
bin Make installer executable 2016-02-23 13:19:35 -06:00
tests Merge branch 'master' of https://github.com/darkwing/wp-sw-cache into race_network_cache 2016-03-14 11:50:28 +00:00
wp-offline-shell Localize cache-network-race field description 2016-03-14 11:51:57 +00:00
.gitignore Rebrand plugin with new name and prefixes 2016-03-08 11:30:20 -06:00
.travis.yml Use Chromium for tests instead of Chrome 2016-03-11 12:54:35 +00:00
LICENSE Rebrand plugin with new name and prefixes 2016-03-08 11:30:20 -06:00
Makefile Rebrand plugin with new name and prefixes 2016-03-08 11:30:20 -06:00
README.md Updates to make SVN friendly 2016-03-08 20:59:53 -06:00
karma.conf Run Chromium without sandbox 2016-03-11 13:02:18 +00:00
package.json Fix #81 - Prevent normalize/referrer from bricking SW 2016-03-10 16:48:20 -06:00
phpunit.xml.dist Add an update path for plugin 2016-03-04 15:35:13 -06:00
sw-tests.js Adding more efficient caching mechanism so entire caches aren't deleted for one file change 2016-03-02 12:06:24 -06:00

README.md

Build Status WordPress plugin WordPress

Offline Shell

A WordPress plugin for caching theme assets via a service worker for the sake of performance and offline functionality.

Build

To build the plugin, ensure you have Composer, then simply invoke composer install.

Installation and Usage

Assuming the build step completed successfully, place the wp-offline-shell directory inside your WordPress instance's wp-content/plugins directory.

With the plugin in the WordPress directory structure:

  1. Activate the plugin
  2. Navigate to the plugin's settings page
  3. Choose assets from the listing that are used most frequently (style.css is likely used on every page of the blog, for example)
  4. Save!

A service worker will then be placed within every page of the blog and select assets will be served from the service worker!

Install the plugin

Clone the repository and copy the folder wp-offline-content inside your WordPress plugins directory.

Activate the plugin from the Plugins menu in the Dashboard. Options are available to customize under the Offline content submenu in Settings.

Running tests

Install dependencies:

./bin/install-wp-tests.sh MYSQL_DATABASE_NAME MYSQL_USER MYSQL_PASSWORD localhost latest

Run tests:

make test

Run service worker tests:

make test-sw

Contribution and Bugs

Contributions are welcome! You can file pull requests or or issues at this repository.