Progressively enhancing Instamojo.com

Aakash Goel
Aakash Goel | Journal and Blog
4 min readFeb 16, 2016

We entered 2016 with a Brand Spanking New Dashboard for Instamojo merchants and buyers. Post that, every now and then we ensure that we take time out from our mundane tasks (read - new features, bug fixes and support) and think about ways in which we can be progressive in nature to serve users who are using the greatest devices and browsers out there. Making a site work offline is not a product requirement (unless that’s what you’re building) and can probably never be for a startup trying to ship things faster and getting things done. This entire initiative was driven by FrontEnd Engineers with (very minimal involvement)** of the Product Managers or the Designers.

The Service Worker bit

Thousands of merchants and buyers log into their Instamojo Dashboard on a daily basis. About 25% such users come via mobile devices on a flaky Internet connection. With a goal of reducing both perceived and actual load times for such users, we started serving all network requests via Service Workers. All static assets are cached the first time they are fetched from network and all such subsequent requests are served from this Service Worker Cache. All dynamic calls are requested first via the network with a timeout which then falls back to a response in the Service Worker Cache. See it in action below.

Service Workers in Action

The Installable App bit

Chrome and Opera users on Android can now Install Instamojo App on their Android Devices. Begin by visiting Instamojo.com on Google Chrome or Opera (Android). Tap on the Menu Icon and then on “Add to Home Screen”.

If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.

Progressive Web Apps pass this Duck Test. After “Add to Home Screen”, you can’t differentiate between the Instamojo App which has just been installed via the browser vs an App that you installed via the Play Store.

What’s even better is that you don’t have to spend your precious data installing updates for the app. No longer spending 50Mb every week for those “Bug fixes” updates you don’t really care about.

Instamojo App installed from the browser
Instamojo App working seamlessly when Offline

Is it worth your time?

YES. A hundred times over. Browser support for Service Workers is on the rise and this is one of those “must haves” to give your repeat visitors a smoother experience.

Now, it might be difficult for you, Dear FrontEnd Engineer, to convince your bosses who look at numbers and charts all day with the potential benefits from investing your time in this because those numbers ain’t gonna change for them because of this. In all honesty, find your own reason and get the balls rolling. Be the hero who takes the web forward in the most cleanest of ways possible. Be the hero the web deserves, but not the one it needs right now. Or, does it not?

Not diving into the the tech behind it as it’s fairly simple to learn and implement. Should you have any doubts or seek clarifications, we can always get talking.

Credits

Always believing in giving credits where due, here they go -

** Except a few heated discussions about where to put the “You are Offline” message, of course.

--

--

Aakash Goel
Aakash Goel | Journal and Blog

Tech Entrepreneur | Founder, CEO at Investmint.club - stock market app for a rich future