6/7/2023 0 Comments Base64 encoding postman![]() Download size increaseĪlthough Base64 is a relatively efficient way of encoding binary data it will, on average still increase the file size for more than 25%. While compression actually compresses data, encoding just defines a way how data is encoded, which brings us to the first issue. One must be careful to not mix up compression with encoding. This is useful when the storage or delivery medium does not support binary data such as when embedding an image into a database, CSS files or HTML. To put it simply, Base64 is an encoding schema used for representing binary data in a text format. To get to the answer why, we first need to establish what Base64 actually is. This works around most limits that the Base64 encoding solved and in fact means Base64 now does more bad than good. With the introduction of multiplexing that arrived with HTTP/2, web browsers have become incredibly efficient in delivering hundreds of files through a single connection. This effectively removed the need for an extra roundtrip the browser would need for each of the files. Base64 provided a way of working around that by using an already open HTTP connection to deliver images embedded directly into the HTML or CSS. This meant an image heavy website would need to queue up requests and wait for the ones before to finish. Back then, web browsers had heavy limits on the number of concurrent connections they could send to the server. ![]() In this post, I want to address why in this day and age, this is almost always a very bad idea that has been carried over from years ago. In this article , that’s what I am going to show you, I will cover the use case ousing Postman tool.Unfortunately, even to this day, some optimization plugins and blogs suggest "optimizing" your images by encoding them to Base64 and including that straight into your HTML. If we can use a tool /service hosted or installed inhouse, wouldn’t that be a great solution. Sacred ? But don’t worry my intention is not to scare you, rather help you to know that “ how much important is testing” and “the value of test data”. If the data goes public it may not only attract competitors but also hackers waiting for your sweet little mistake. Think of your company building a new product. Remember sometimes test data is much more important and confidential than anything already out there in the market. It is so easy to use free online resources.īut let ‘s be honest and accept the fact, that we have been doing that for ease of access and quick beautification of data such as json. Question here is how often we do it offline ( not copy pasting data on some websites which are not hosted in your company’s network) . Having said that , we have a lot of use cases where you may have to implement Base64 encoding and/or decoding during software development or a website page. Rather than storing them over the internet as human readable plain text strings. ![]() And so it remains close to the heart of each and every developer who starts learning this simple yet powerful algorithm.Īlways advisable to better keep the data such as : passwords, token, email , URL etc. Base 64 decoding/encoding is one of the most fundamental and reversible encoding technique.
0 Comments
Leave a Reply. |