PWA - Why should you use it and not use it?
Tags: javascript, webdev, codenewbie, css
Published: 2020-05-10 16:22:17

In the current world of technologies, one of the technologies that is currently booming is the PWA. It was introduced by Google in 2015 and since then plenty of websites have adopted this technology. And the result obtained through this are also marvelous.

## What am I talking about?

PWA stands for **Progressive Web Apps**. PWA is a web app, which can be displayed in the form of a regular App on a phone ( platform-independent) and also works like a regular responsive website on the internet. It is like building a usual website, using the same technologies that you would use, but giving that extra functionalities and advantages of Progressive Web Apps. It is light, fast and secure.

## What extra stuff does it use?

You can build your website mostly the way you would always, considering you have set up a responsive layout and works on majority of the browsers. It consists of Javascript mainly and uses Service Workers, in which the server of the PWA is saved in the user’s web browser, and from time to time new feeds are loaded into it. This is the main reason of the speed of a PWA. So these service workers takes care of features which we will be talking about below. 

## The Advantages of building a PWA:
**1. Responsive Layout**
Yes, you have to build a Responsive Website. This would surely attract a lot of mobile users to your website. Today Most of the market is from the mobile users. So you got this checked.

**2. Available in offline Mode**
Oh Yeah. Once you use the PWA website on your browser, the cache of the website will automatically save in your web browser. Which means that you can later easily view the webpage in the Offline mode.

**3. Add to the Home Screen**
Once you open a PWA website, you will get a prompt to add it to your home screen. This makes it easy for the users, and even the website traffic will increase

**4. Acts like a Mobile App**
You heard it right, from then onwards when you open a PWA it will act like a mobile App. Opens without the URL bar and other Tab options. Gets installed on the phone ( without harmful access to the Phone’s hardware and software ).

**5. Push Notifications**
Sending notifications to the user phones even when the website is closed. You can do that??? Yup , totally possible.

**6. Very less memory space**
I used the very on purpose. Imagine a 10MB Play Store app working at 250kb on your phone. I’m serious.

**7. Cross-Platform**
Develop a PWA compatible web app and use it on any phone which supports Chrome Browser, on any desktop which has a browser. Yes! Yes! YESS!

---

Every coin has a flip side to it

## The Disadvantages

**1. There is a catch with the push notifications**
To enjoy the push notifications and in prompt builds, the website needs to use the secured TL connection.

**2. Not easy for a beginner to get started**
If you are a developer and you want to develop PWAs then you have to have the knowledge of HTML, CSS, Javascript, ES6 and a minimal understanding of the related technologies which you may encounter on your way. Though there are easy shortcuts to get started, ( Now that is for another blog post )

**3. No download store presence**
You cannot have a direct pwa at the Play Store or the App store.

**4. Cannot modify the splash screen that easily**
The splash screen that appears when you open the PWA is not customizable out of the box.

_Also note that your website must be served through `https` which means you need an SSL certified connection._

---

## Conclusion

- PWAs are always going to be great technology. It has just begun its journey and it has a huge way to go.
- It is now being served as a cheaper option than a native app, where you need an app to have minimal animation and native app support.
- New Inventions are going to be seen. Until then try to gain the PWA knowledge.


## Example
**My recent PWA: https://bit.ly/stick-it-notes**
*Will get back to y'all on another post as to how I built it without coding any PWA part*

**Wanna Learn JavaScript?**

I have got the exact place where you can learn it from, ask doubts and also get a Certificate on Completion. Check out this course from Udemy <a href="https://www.udemy.com/course/javascript-tharunshiv/?referralCode=6326CE49CCF4074B11CE" target="_blank">(Click) JavaScript Modern ES6 - 2020 - The Complete Course - Udemy</a>. The first few videos are free on my YouTube Channel. Try them out here: <a href="https://www.youtube.com/playlist?list=PLQTwHWAmj18Y2dfj-8PkIogD9hrBzp4M9">Developer Tharun - YouTube - JavaScript Playlist</a> Thank you for reading!

_Did you know the 4 ways to use Generator Functions?_
{% link https://dev.to/tharunshiv/4-ways-to-use-generator-functions-in-javascript-examples-advantages-2ohd %}

> Written by Tharun Shiv, originally at https://tharunshiv.com

Written by,
{% user developertharun %}

# Thank you for reading, This is Tharun Shiv a.k.a Developer Tharun

![Tharun Shiv](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtxq6bdms36fmn62450h.png)

{% user tharunshiv %}