Why do we need client-side storage?
Learn what is the need to having a client-side or browser storage. In this video, you will learn 2 use-cases where storing the data on the browser makes a good use case for a better user experience.
Full Transcript
0:00 Hey, it's Harit from bonsaiilabs. Welcome to the series on JavaScript. Today in this video, we will learn why client side storage or browser storage is important. Let's say we are sitting in sunny San Francisco and we request a webpage that is stored on a server in Auckland, New Zealand. To get the page, the call would travel from SF crossing the continents, passing through the mountains and oceans before it lands on the server where the web page is stored. And then, get the page as a response and travel all the way back through the continents, mountains and rivers before the page land in California and served on the browser. Now this could result in a slower responses and a bad user experience. So this is one use case we're storing the data on the client side would speed up the further interaction with the web since the static assets are now closer to the request and will be served faster.
0:50 The other scenario where storing the data on the client is important is for good user experience. For example, Facebook might keep a list of your friends. Twitter may keep the list of your recent tweets. Github may store your project list and LinkedIn may store your connections on the client side to serve the request faster. And almost every application stores a user preferences such as theme color, appearance, and font size on the client side to give the best experience to the user. Okay, so I hope now you are convinced for the need of the client side storage. There are followup questions you may have, such as where is the data stored on the client side and can I see it? If you would like to learn about them, please comment on the video and we will answer these questions in our future videos. If you like the video, please hit the subscribe button on our channel to receive more engaging content about JavaScript every single week. Until then, keep learning new skills and apply them regularly to become an expert programmer. See you next time.