<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Waseem</title>
    <description>The latest articles on DEV Community by Muhammad Waseem (@toolflic).</description>
    <link>https://dev.to/toolflic</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4225970%2Fff3c8fb2-c70a-4e74-a753-8ee3e0b969cf.jpg</url>
      <title>DEV Community: Muhammad Waseem</title>
      <link>https://dev.to/toolflic</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/toolflic"/>
    <language>en</language>
    <item>
      <title>Why I Stopped Loading Entire Files Into Memory (And How It Saved My Web App)</title>
      <dc:creator>Muhammad Waseem</dc:creator>
      <pubDate>Thu, 12 Nov 2026 19:22:21 +0000</pubDate>
      <link>https://dev.to/toolflic/why-i-stopped-loading-entire-files-into-memory-and-how-it-saved-my-web-app-4f7g</link>
      <guid>https://dev.to/toolflic/why-i-stopped-loading-entire-files-into-memory-and-how-it-saved-my-web-app-4f7g</guid>
      <description>&lt;p&gt;When you build client-side tools, user privacy isn't just a feature. It's a strict architectural requirement.&lt;/p&gt;

&lt;p&gt;No backend. &lt;br&gt;
No uploads. &lt;br&gt;
No server.&lt;/p&gt;

&lt;p&gt;But nobody warns you about the hidden cost of running everything in the browser: Memory Limits.&lt;/p&gt;

&lt;p&gt;I learned this the hard way while building ToolFlic, a suite of 100+ browser-based utilities. &lt;/p&gt;

&lt;p&gt;When users started processing large PDFs and high-resolution images, the browser tabs started crashing. &lt;/p&gt;

&lt;p&gt;Here is the story of why it happened, and how I fixed it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Naive Approach: Load Everything
&lt;/h2&gt;

&lt;p&gt;When I first started building the file tools, my approach was simple. &lt;/p&gt;

&lt;p&gt;I used the FileReader API to read the entire file, pass it to the processing library, and generate the output.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const reader = new FileReader();
reader.onload = (e) =&amp;gt; {
  const buffer = e.target.result;
  // Process the entire buffer at once
};
reader.readAsArrayBuffer(file);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For a 2MB image, this works perfectly.&lt;/p&gt;

&lt;p&gt;But what happens when a user uploads a 50MB PDF? &lt;/p&gt;

&lt;p&gt;The browser tries to allocate all of that data into RAM at the same time. &lt;/p&gt;

&lt;p&gt;The browser's garbage collector cannot keep up. &lt;/p&gt;

&lt;p&gt;The UI freezes, and eventually, the tab crashes with the "Aw, Snap!" error.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Reality of Client-Side Processing
&lt;/h2&gt;

&lt;p&gt;JavaScript does not give you direct control over memory management. &lt;/p&gt;

&lt;p&gt;You cannot manually free up an ArrayBuffer after you are done with it. &lt;/p&gt;

&lt;p&gt;You have to rely on the browser's garbage collector, and it only runs when it wants to.&lt;/p&gt;

&lt;p&gt;If you want to process large files without crashing, you have to stop thinking like a backend developer.&lt;/p&gt;

&lt;p&gt;You have to think like a systems engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Chunking and Web Workers
&lt;/h2&gt;

&lt;p&gt;I had to completely rewrite the way files were read and processed. &lt;/p&gt;

&lt;p&gt;Here is the architecture that fixed it.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Read Files in Chunks
&lt;/h3&gt;

&lt;p&gt;Instead of reading a 100MB file all at once, I read it in smaller chunks using File.slice().&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const chunkSize = 5 * 1024 * 1024; // 5MB
let offset = 0;

while (offset &amp;lt; file.size) {
  const chunk = file.slice(offset, offset + chunkSize);
  const buffer = await chunk.arrayBuffer();

  // Process the chunk
  offset += chunkSize;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;By reading in chunks, memory usage stays flat. &lt;/p&gt;

&lt;p&gt;The browser only ever holds 5MB in memory at any given time, no matter how big the file is.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Offload to Web Workers
&lt;/h3&gt;

&lt;p&gt;Even with chunking, heavy processing can block the main thread and freeze the UI.&lt;/p&gt;

&lt;p&gt;I moved the processing logic into Web Workers. &lt;/p&gt;

&lt;p&gt;Web Workers run on a separate thread. &lt;/p&gt;

&lt;p&gt;The main thread stays free to handle user interactions, like dragging and dropping files.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The UI Feedback Loop
&lt;/h3&gt;

&lt;p&gt;When you process large files client-side, the user needs to know the app hasn't frozen. &lt;/p&gt;

&lt;p&gt;I used postMessage from the Web Worker to send progress updates back to the main thread.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Inside the Web Worker
self.postMessage({ progress: 50, status: "Processing..." });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This allowed me to build a progress bar that updates in real-time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tradeoff
&lt;/h2&gt;

&lt;p&gt;Building things to run entirely in the browser is harder than sending a request to a server. &lt;/p&gt;

&lt;p&gt;You have to respect the constraints of the user's device. &lt;/p&gt;

&lt;p&gt;You have to handle edge cases like low memory and slow CPUs.&lt;/p&gt;

&lt;p&gt;But the tradeoff is worth it. &lt;/p&gt;

&lt;p&gt;By doing the work client-side, you guarantee that the user's data is completely private.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;If you are building browser-based tools, treat the browser like a resource-constrained environment. &lt;/p&gt;

&lt;p&gt;Never load the whole file at once.&lt;br&gt;
Use Web Workers for anything CPU-intensive.&lt;br&gt;
Always assume the user is on a low-end device.&lt;/p&gt;

&lt;p&gt;You can see these techniques in action on &lt;a href="https://toolflic.com" rel="noopener noreferrer"&gt;ToolFlic&lt;/a&gt; - &lt;a href="https://toolflic.com/all-tools/" rel="noopener noreferrer"&gt;All Free Online Tools&lt;/a&gt;. &lt;br&gt;
It handles large files entirely on your device, without ever hitting a server.&lt;/p&gt;

&lt;p&gt;I'd love to hear how other developers handle memory management in the browser. &lt;/p&gt;

&lt;p&gt;What techniques do you use?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>performance</category>
      <category>showdev</category>
    </item>
    <item>
      <title>How I Built 105 Free Privacy-First Browser Tools as a Solo Developer</title>
      <dc:creator>Muhammad Waseem</dc:creator>
      <pubDate>Wed, 04 Nov 2026 19:21:43 +0000</pubDate>
      <link>https://dev.to/toolflic/how-i-built-105-free-privacy-first-browser-tools-as-a-solo-developer-3ej0</link>
      <guid>https://dev.to/toolflic/how-i-built-105-free-privacy-first-browser-tools-as-a-solo-developer-3ej0</guid>
      <description>&lt;p&gt;I got tired of it.&lt;/p&gt;

&lt;p&gt;Every time I wanted to compress a PDF or resize an image, I had to visit a new website. Sign up. Upload my file to some server I don't know. Wait. Download a watermarked result.&lt;/p&gt;

&lt;p&gt;For a client document or a personal photo, that felt wrong.&lt;/p&gt;

&lt;p&gt;So I built ToolFlic. 105 tools, and 90 of them run entirely in your browser. Your file never gets uploaded anywhere.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1pt4xt2t5nsc3omf4seq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1pt4xt2t5nsc3omf4seq.png" alt="ToolFlic no-upload tools page showing 90 tools that run entirely in the browser" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What was wrong with existing tools
&lt;/h2&gt;

&lt;p&gt;Nothing, honestly. They work.&lt;/p&gt;

&lt;p&gt;But almost all of them do the same thing. You upload your file. It goes to their server. They process it. They send it back. Sometimes with a watermark. Sometimes after asking for your email. Sometimes the free version works once, then you hit a paid tier for a simple task you could do yourself.&lt;/p&gt;

&lt;p&gt;For most people that's fine. For anyone handling client work, personal photos, or anything sensitive, it's a real concern.&lt;/p&gt;

&lt;p&gt;I wanted the opposite. Keep the file on the user's device. Do the work in the browser. No uploads, no account, no paid tier, no servers holding my stuff.&lt;/p&gt;

&lt;h2&gt;
  
  
  How ToolFlic works
&lt;/h2&gt;

&lt;p&gt;105 tools across 9 categories. PDF, Image, SEO, Text, Developer, Calculator, Generator, Video and Audio, and Other.&lt;/p&gt;

&lt;p&gt;90 of them run entirely client-side. No uploads. No paid tier. No account.&lt;/p&gt;

&lt;p&gt;The other 15 need a live connection. Things like domain lookups and SEO analyzers can't run offline. I'm upfront about that. There's a dedicated &lt;a href="https://toolflic.com/no-upload-tools/" rel="noopener noreferrer"&gt;No-Upload Tools page&lt;/a&gt; that lists exactly which tools work locally and which don't.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqnvfiqopef9n7zordoay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqnvfiqopef9n7zordoay.png" alt="ToolFlic listing the 15 tools that need an internet connection, shown openly for transparency" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack (nothing fancy)
&lt;/h2&gt;

&lt;p&gt;Plain JavaScript, HTML5, CSS3. No React, no Next, no build step.&lt;/p&gt;

&lt;p&gt;Canvas API for anything image related. Compression, resizing, cropping.&lt;/p&gt;

&lt;p&gt;File API to read files locally. The file never leaves the browser.&lt;/p&gt;

&lt;p&gt;PDF.js and pdf-lib for parsing and generating PDFs in the browser.&lt;/p&gt;

&lt;p&gt;No backend for user files. Everything happens in the browser.&lt;/p&gt;

&lt;p&gt;People sometimes ask why I didn't use a framework. The honest answer is I didn't need one. The tools are simple. A framework would have added weight without solving anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was actually hard
&lt;/h2&gt;

&lt;p&gt;Not the tools. The edge cases.&lt;/p&gt;

&lt;p&gt;Large files. Browsers have memory limits. I had to add chunking and progress feedback for anything above a certain size.&lt;/p&gt;

&lt;p&gt;Image formats. JPG, PNG, WebP, HEIC, SVG. Each one behaves differently. Transparency, color profiles, compression quality. Every format broke something at least once.&lt;/p&gt;

&lt;p&gt;PDF parsing. PDFs are messy. Encrypted files, scanned images, broken structures. All of it has to be handled without crashing.&lt;/p&gt;

&lt;p&gt;Being honest about what doesn't work. Some tools can't run locally. Instead of hiding that, I built a page that clearly splits local tools from tools that need a connection.&lt;/p&gt;

&lt;p&gt;Testing took way longer than building.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;Two things.&lt;/p&gt;

&lt;p&gt;One. Building solo is hard. Marketing is harder. I can ship a tool in a day, but getting anyone to notice it takes weeks.&lt;/p&gt;

&lt;p&gt;Two. Being honest about limits builds more trust than pretending there are none. When I tell people "this tool needs internet, that one doesn't", they trust the rest more.&lt;/p&gt;

&lt;p&gt;And then there are the small moments.&lt;/p&gt;

&lt;p&gt;Someone uses a tool and says "this saved me time". Or a stranger emails to say "I got it, it worked, thanks". That's it. That's the whole reward. It makes the long nights worth it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;I'm adding tools based on what people actually ask for. If there's a tool you wish existed, tell me. If it can run in the browser, I'll build it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc23k394lm6ednkn4h35e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc23k394lm6ednkn4h35e.png" alt="ToolFlic showing 105 free tools across 9 categories" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear your thoughts on this architectural shift. &lt;br&gt;
Do you think we are moving towards a future where most file processing happens client-side, or will heavy cloud-based APIs always win? &lt;/p&gt;

&lt;p&gt;If you want to test the limits of client-side processing yourself, I built a suite of 105+ free tools that run entirely on your device. No uploads, no accounts, no servers. Try compressing an image or merging a PDF at &lt;strong&gt;&lt;a href="https://toolflic.com" rel="noopener noreferrer"&gt;ToolFlic&lt;/a&gt;&lt;/strong&gt; and tell me if the performance meets your expectations in 2026.&lt;/p&gt;

&lt;p&gt;Let me know your thoughts in the comments below!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
