September 4, 2020
August 19, 2020
August 4, 2020
The Fetch API as we all know is the modern replacement to the good old XHRHttpRequest AKA Ajax as it’s much simpler and uses promises. It’s great to make API calls without adding any third-party library overhead.
July 29, 2020
July 28, 2020
The usual way of adding event-listener on certain elements is using the
addEventListener method on the element. For instance, if you want to register a click event on an element with id
checkoutBtn, you can do it like so.
July 27, 2020
I was working on implementing the Konami code easter egg on this blog and there was this need where I need to stop the scrolling only when the previous two presses by the user are
July 24, 2020
July 14, 2020
June 23, 2020
While working on Your First Commit Ever, there arised a requirement in which I had to update/change the URL’s query paramter based on the user input.
June 2, 2020
There comes a scenario when you might want to check which operating system the device is running. For instance, when you want to set device-specific download links. For windows,
.exe file, for macOS,
.dmg file and so on.
May 25, 2020
May 19, 2020
There might be cases where you would like to check if the device on which the website is loading is connected to the internet or not. For instance, this can be used to show the user the message if their device is offline or to disable some functionality of the application if the device is offline.
May 18, 2020
You’ve probably seen or have used this feature where you can upload files by dropping the selected files into the specific area. For example, how Gmail handles this while drafting emails.
May 11, 2020
Implementing a Dark mode in applications is all the rage these days. And you can provide a toggle to switch between Dark/Light mode to users like the one I’ve implemented on my Notepad app.
April 8, 2020
I was working on polishing my Notepad app this fine quarantine afternoon. One feature that I was planning to add was an ability to download the content of the notes/text as a text file when user click the specified download button.
January 4, 2020
for...of. All these constructs loops over synchronous iterables such as arrays, objects, strings etc.
December 23, 2019
December 22, 2019
When using React component using ES6 classes, you must have encountered this phenomenon where you have to explicitly bind the class function and then pass it to the even such as
onClick. For instance, take the following example.
August 29, 2019
August 8, 2019
March 29, 2019
September 3, 2018
Progressive Web Apps are great when you need to achieve things like offline capabilities, push notifications, background-sync and to give your website an overall app-like experience. While, the PWAs are great at implementing all of the above things and are the obvious choice, there are certain things which can be broken when you use ServiceWorker(which are the building blocks of any PWA) to make your webaite a PWA.
March 21, 2017
We all know how good is Chrome Dev Tools when it comes to the web debugging capabilities. There are number of features in the Dev Tools which are very useful but we are unaware of.
March 15, 2017
November 15, 2016
Today, We are going to build a progressive Notepad app which can very well be used in offline mode, be responsive on all available devices, and saves the content locally on the device itself. So, the core functionality of this Notepad here is to make it work offline. To fulfill this requirement, we’ll use ServiceWorkers which I’m going to cover next.
June 22, 2016