Git Product home page Git Product logo

mcw-pwa's Introduction

Minimum Configuration WordPress PWA Plugin

Overview

This plugin is developed to focus on enhancing the loading experiences with minimum configuration.

The plugin's current features:

  • use service worker to cache all static assets like images, JavaScripts, CSS styles, and fonts. It use Workbox as a library.
  • use Intersection Observer API to lazy load images on page.
  • make scripts loaded with async if no dependency found and defer if it has dependency like jQuery library. This is a bit risky if themes or plugins not include the scripts with wp_enqueue_script function or not include dependency when they enqueue the script. Make sure you check there is no error on JavaScript console when you activate the plugin.
  • install service worker on AMP page if the website has AMP plugin running. AMP is a custom elements library that boost the website loading performance.
  • add offline page to show when user offline.
  • scan and set static URLs to precache with service worker.
  • preload your CSS and JavaScripts to boost performance.
  • Integrated loading performance monitoring with Google Analytics. If you have Google Analytics, it will track page load user performance metric to your Google Analytics using user timings report.

To Develop

  • Select page to precache
  • Notificaton on offline connection

Setup For Development

To install the plugin follow the steps. Follow this steps to work on git svn syncronize repo.

  1. Clone the repo to a directory inside your wp-content/plugins directory by running command in your terminal git clone https://github.com/wp-id/mcw-pwa.git mcw-pwa
  2. Install NPM first because we need it to install Workbox library
  3. Switch your terminal working directory to mcw-pwa/scripts and run command npm install to install the WorkBox library.
  4. Activate the plugin inside your WordPress Admin Panel on plugin section.
  5. Check with your Browser's DevTool to make sure there is no JavaScript error in your JavaScript console.

Credits

I use some plugins as my references to develop this plugin. Please check their amazing works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.