How to make progressive web app (PWA) for your Blogger website

How to make progressive web app (PWA) for your Blogger website

Adding a progressive web app to websites is common nowadays and many of the big websites are using it instead of the classic android app or iOS app.

When browsing a website with the PWA feature, you will get a call to action notice, asking you to install their app to your computer. This way, you can install a light-weight app which offers a native app experience. This will be good for smartphone users and can help your audience easily access your website with just a single click rather than having to open the web browser and typing your website address.

For today's tutorial, we are going to walk you through the steps on how to make a progressive web app (PWA) for your Blogger website.

Adding this feature to a WordPress site is pretty easy via numerous plugins. But for a Blogger site, we will have to create our PWA manifest file and load it from and external source. Also, note that for the time being, this PWA for Blogger won't work for PC owing to the lack of the service-worker.js.

But you should be able to use this guide to get it working for your smartphone. All you have to do is follow the simple steps below.

What is a Progressive Web App?

A progressive web application is a type of application software delivered through the web, built using common web technologies including HTML, CSS and JavaScript. It is intended to work on any platform that uses a standards-compliant browser. 

PWAs are built to take advantage of native mobile device features, without requiring the end-user to visit an app store, make a purchase and download software locally.

Unlike traditional apps, progressive web apps are a hybrid between regular web pages and mobile applications.

Making a Progressive Web App for your Blogger website

In order to make this work normally, you will have to;
  1. Create icons of different sizes for your PWA. Icons should be the favicon of your Blogger site.
  2. Creat a manifiest.json file for the PWA containing details like site name/title, icons of different sizes for different devices, site link, etc.
  3. Hosting and using the manifest.json 

1. creating icons of the correct sizes and format

To start, you will need to create icons of different sizes for your PWA to be installed on your Blogger site.

To generate icons of different sizes, you can either use favicon.io or makeappicon.com. And if your logo is one generated from a text, it is advisable you make the background transparent. 

After generating your icons from one of the sites recommended below, you will have a zip file available for download, and in there, you will find icons of different sizes to use.

You will have to upload the images to your Blogger blog. Simply create a draft post or page, upload them and get the image links.

You can now move to the next step which is configuring the manifest.json file for the PWA.

2. Creating and configuring your manifest.json

Below, we have a sample manifest.json file we are using for one of our Blogger blog It's Apple OS.


 {
  "name": "It's Apple OS",
  "short_name": "It's Apple OS",
  "start_url": "https://www.itsappleos.com/",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#1a73e8",
  "description": "It's Apple OS is all about iPhone signed ipsw files, iOS Tools, Apps sale, news and tricks",
  "icons": [{
    "src": "https://3.bp.blogspot.com/-DSir6HiwQfw/XwytVC4ck6I/AAAAAAAAIxE/V-ZuQkV1xiIIx6k86kgGhGaJghoRN4zQgCK4BGAYYCw/s400/iaos36.png' rel='apple-touch-icon",
    "sizes": "36x36",
    "type": "image/png",
    "density": "0.75"
  }, {
    "src": "https://4.bp.blogspot.com/-nHFPmQrIXYI/Xwyt--ee0qI/AAAAAAAAIxc/R87ZaYaB3kI3ZVOC-rIGY8A_B9WQn1shgCK4BGAYYCw/s1600/iaos48.png' rel='apple-touch-icon' rel='apple-touch-icon",
    "sizes": "48x48",
    "type": "image/png",
    "density": "1.0"
  }, {
    "src": "https://3.bp.blogspot.com/-Y8jNmqbNYnk/XwyuQd3_mjI/AAAAAAAAIxs/aYyvMGtPxKY6WEdQoNHAiIdmCQmiIktmgCK4BGAYYCw/s400/iaos72.png' rel='apple-touch-icon",
    "sizes": "72x72",
    "type": "image/png",
    "density": "1.5"
  }, {
    "src": "https://2.bp.blogspot.com/-KL2SO6g-RgA/XwyuY1EsGDI/AAAAAAAAIx0/iTNMvqhgaYsq-wLA7oqHkiQzViLyadVVwCK4BGAYYCw/s400/iaos96.png",
    "sizes": "96x96",
    "type": "image/png",
    "density": "2.0"
  }, {
    "src": "https://3.bp.blogspot.com/-sSikLc2_6l0/XwyuubMHViI/AAAAAAAAIyE/djXoxzvwvlItooZU-VFZuh2NXtoMUWPXwCK4BGAYYCw/s1600/iaos144.png' rel='apple-touch-icon",
    "sizes": "144x144",
    "type": "image/png",
    "density": "3.0"
  }, {
    "src": "https://1.bp.blogspot.com/-EwtxObb4h0o/Xwyu5OZmxEI/AAAAAAAAIyM/zLXmFx0fjoIiExohXlcCezvEjeJQgdH5ACK4BGAYYCw/s400/iaos192.png' rel='apple-touch-icon",
    "sizes": "192x192",
    "type": "image/png",
    "density": "4.0"
  }, {
    "src": "https://2.bp.blogspot.com/--1e26_JpJBk/XwytK52kx4I/AAAAAAAAIw4/LXQDzsOOdWAr0JNo-5dtaA8ndDK7vbaggCK4BGAYYCw/s320/iaos512.png' rel='apple-touch-icon",
    "sizes": "512x512",
    "type": "image/png",
    "density": "5.0"
  }]
}

What you will have to do here is change the image links, site name, short name and description to match that of your site.

Using Notepad++ create a new file named manifest.json and then copy the code above and paste it there. Perform the modifications as explained above and save.

Where to host your manifest.json file.

Since Blogger doesn't have any root directory where you can store your website files like scripts, you will have to upload it somewhere else and load it from where it is hosted.

We recommend using Github to host the manifest or Drivehq. And for those who want to use Github, after hosting the manifest.json file, you can get the link using Githack.

With Drivehq, after uploading the manifest file, simply click on it and click on "publish' to get the link.

Once you've hosted your manifest.json file and gotten the link, you can then insert the link to your website head section. The line of code to be added should look like this;


<!-- Rel Manifest Link --> 
<link  rel ="manifest"  href ="manifest.json link here"/>

To add the manifest.json, login to your Blogger dashboard and go to Theme > Edit HTML and then paste the line of code above in the head section of the HTML code. Note that you have to change "manifest.json link here" and put your manifest.json file link from Github or Drivehq.

Also, add the meta tag below for the apple mobile web app title.


<meta  name ="apple-mobile-web-app-title"  expr: content ="data: blog.title"/>

What to note:


  • You blogger site should have a meta description tag
  • Your images used should respect the resolutions specified on the manifest.json
  • Use images of high resolution.
  • Take a backup of your theme before trying this out.

Installing the PWA to your device.

How to make progressive web app (PWA) for your Blogger website

How to make progressive web app (PWA) for your Blogger website

How to make progressive web app (PWA) for your Blogger website

How to make progressive web app (PWA) for your Blogger website

As we said above, there is no service worker so you won't get the option asking to install the PWA for your Blogger site when using Chrome desktop.

But on mobile, to add it to the home screen, simply click on the three dots at the top-right corner and choose 'Add to Home Screen'. The PWA for your Blogger site will then be added to the home screen and ready for use.