DEV Community

0x3d Site
0x3d Site

Posted on

28 9 13 11 12

9 Sneaky Web Dev Fixes That Save Hours

GET A 50% DISCOUNT—EXCLUSIVELY AVAILABLE HERE! It costs less than your daily coffee.


Fix These Hidden Mistakes Before They Waste More of Your Time

Let’s cut the fluff—most developers (even the smart ones) waste time fighting problems that already have better solutions.

You’re chasing bugs, writing the same code over and over, or patching things with duct tape because you didn’t know there was a cleaner way. So here are 9 sneaky fixes that’ll make your web dev life so much easier—and faster.

Want more under-the-radar gems like these? javascript.0x3d.site is your new best friend. Real tools, real guides, zero fluff.


1. Still Writing document.querySelector Everywhere? Just Shortcut It!

Stop repeating yourself like a parrot. Create your own selector shorthands:

const $ = (sel) => document.querySelector(sel);
const $$ = (sel) => document.querySelectorAll(sel);
Enter fullscreen mode Exit fullscreen mode

Now $('#app') works just like jQuery—but you're still using vanilla JavaScript. Fancy.


2. You Don’t Need a Framework for Smooth UI Animations

Native Element.animate() is criminally underrated:

element.animate([
  { opacity: 0 },
  { opacity: 1 }
], {
  duration: 500,
  easing: 'ease-in'
});
Enter fullscreen mode Exit fullscreen mode

Smooth animations without CSS classes, external libs, or even jank. 🎯


3. HTML Has a Built-In Dialog Element. Use It!

Instead of hacking together modal windows:

<dialog id="myModal">Hello!</dialog>
Enter fullscreen mode Exit fullscreen mode
document.getElementById('myModal').showModal();
Enter fullscreen mode Exit fullscreen mode

Boom—instant modals, native to HTML. Clean, accessible, no extra libraries.


4. Stop Using Local Storage for Everything

Yes, localStorage is easy. But it’s synchronous and blocks the main thread.

If you're saving larger or complex data:

🧠 Use IndexedDB (or a wrapper like idb-keyval)

🔥 Or try caches API for static data—originally meant for service workers, but usable in client-side logic too.


5. Add “type=module” and Instantly Use import in the Browser

Don’t want to use Webpack/Vite just to try out modules?

<script type="module">
  import { hello } from './utils.js';
  hello();
</script>
Enter fullscreen mode Exit fullscreen mode

Yup, this works in the browser. Dev just got way simpler.


  • Try this if you're free (also it's promotion)


6. No-BS Toast Notifications with Just CSS + a <template>

You don’t need a whole UI library for toast messages. Try this:

<template id="toast">
  <div class="toast">Copied!</div>
</template>
Enter fullscreen mode Exit fullscreen mode
const toast = document.importNode(toastTemplate.content, true);
document.body.appendChild(toast);
setTimeout(() => toast.remove(), 2000);
Enter fullscreen mode Exit fullscreen mode

Add minimal CSS, and you’re good. Reusable and fast.


7. Use rel="noopener" on External Links or Get Hacked

Opening links like this?

<a href="https://external.com" target="_blank">Open</a>
Enter fullscreen mode Exit fullscreen mode

Add this or risk exposing window.opener to attackers:

<a href="https://external.com" target="_blank" rel="noopener">Open</a>
Enter fullscreen mode Exit fullscreen mode

Simple fix. Big deal.


8. Automatically Lazy-Load Images Without JavaScript

Just add this:

<img src="cat.jpg" loading="lazy" />
Enter fullscreen mode Exit fullscreen mode

Native lazy loading in modern browsers. Stop writing extra scripts and let HTML do the heavy lifting.


9. Use defer on <script> Tags — Always

You probably already know async, but for scripts that depend on the DOM being ready, always go with:

<script src="main.js" defer></script>
Enter fullscreen mode Exit fullscreen mode

It avoids blocking rendering and keeps execution order consistent. Basically, it’s the “just works” version.


Your Toolkit Just Got Sharper

These aren’t hacks. They’re smarter defaults—the kind of stuff most devs miss because they’re buried in Reddit threads or old blog posts from 2012.

The good news? You’ve got javascript.0x3d.site to keep finding these underused gold nuggets. Tools, articles, trending problems—everything you need to level up without burning out.

Now go ship something cool. 💥


🎁 Download Free Giveaway Products

We love sharing valuable resources with the community! Grab these free cheat sheets and level up your skills today. No strings attached — just pure knowledge! 🚀

🔗 More Free Giveaway Products Available Here

  • We've 15+ Products for FREE, just get it. We'll promise that you'll learn something out of each.

Build a Hyper-Simple Website for a Local Business and Charge $500+

Imagine this: You help a local business finally get online, transforming their visibility, and they happily pay you $500 or more for a website you built in just a few hours.You feel empowered.They feel grateful.It’s a win-win — and you don’t need to be an expert to make it happen.I’ve created a complete toolkit designed to remove every obstacle and hand you a simple, repeatable system to build websites, find clients, and get paid — fast.Here’s what you get:📘 1. The Local Digital Goldmine Guide (10 Pages of Pure Value) This step-by-step guide breaks down the entire process into simple, actionable steps: Why Local Businesses Need Simple Websites: Understand the massive opportunity in your local area. The No-Code Website Formula: Build a sleek, professional site in under 2 hours using free or low-cost tools. Finding &amp; Pitching Clients Without Cold Calling: Use non-salesy strategies to attract clients, even if you hate selling. Pricing &amp; Upselling for Recurring Income: Charge $500+ upfront, then stack passive income with hosting and maintenance upsells. You’ll finish this guide not just feeling motivated — but knowing exactly what to do next.✅ 2. Plug-and-Play Checklist (Stay Laser-Focused) Success is simple when you follow a proven process. This checklist is your roadmap: 📍 Pre-Launch Preparation: Research businesses, choose tools, and set up your payment system. 🔍 Client Outreach: Use personalized email scripts and follow-ups to land your first paying client. 🛠️ Website Build: Follow a structured flow to build and launch your client's site. 🤝 Client Management: Communicate like a pro, gather testimonials, and build lasting relationships. 💸 Pricing &amp; Upsells: Lock in high-paying clients, then offer ongoing services for passive income. No overthinking. No confusion. Just tick the boxes, and watch your business grow.🔑 3. Handcrafted ChatGPT Prompts (Your AI-Powered Assistant) Why struggle to write client emails or site content when AI can do it for you? These prompts will save you hours: ✍️ Website Content: Generate compelling headlines, service descriptions, and "About Us" sections. 📧 Client Emails: Draft outreach, follow-ups, and pitch emails in seconds. 📈 SEO &amp; Optimization: Find the best local keywords, write meta descriptions, and boost site rankings. 🎨 Design &amp; Aesthetics: Get layout suggestions, color palette ideas, and font recommendations. 💰 Pricing &amp; Upsells: Brainstorm service packages, pricing tiers, and irresistible upsell offers. You’ll feel like you have a full team behind you — even if you’re a one-person business.👉 This Isn’t Just a Product — It’s a Transformation You’re not just buying a bundle of files. You’re buying: 🔓 Clarity: Know exactly what to do, step by step. ⚡ Speed: Build and launch sites faster than you thought possible. 🧠 Confidence: Feel equipped to approach clients and charge what you're worth. 📈 Freedom: Create a flexible, low-stress income stream from anywhere. Think about it: There are thousands of local businesses that desperately need a website.With this toolkit, you can be the person who delivers that solution — and gets paid handsomely for it.It’s not a question of whether you can do this. The question is: How soon do you want to start?🚀 One decision. One small investment. Infinite potential. Let’s build something incredible.

favicon 0x7bshop.gumroad.com

Making extra income by selling websites has never been easier—AI does most of the work for you!

No need to spend hours researching or figuring things out on your own. This step-by-step blueprint gives you everything you need:

  • ✔️ A complete guide that walks you through the process
  • ✔️ Detailed checklists so you don’t miss a thing
  • ✔️ Pre-made ChatGPT prompts to make website creation effortless

It’s all laid out for you—just follow the steps and start earning! 🚀

Available on Gumroad - Instant Download - 50% OFFER 🎉


9 Sneaky Web Dev Fixes That Save Hours | by 0x3d Site | Apr, 2025 | Medium

Take this as an GIFT 🎁: Build a Hyper-Simple Website and Charge $500+

favicon medium.com

Top comments (6)

Collapse
 
ravavyr profile image
Ravavyr

Ok, no.

Here's why.

  1. Using $ for document.querySelector is not "just like jQuery", because you will not have any of the jQuery functions and setting styling or even innerHTML with it will be vanilla JS, not jQuery.
    All you're doing is confusing yourself when you expect it to behave like jquery and it sure as heck will not.

  2. ok, this one's ok.... still, i like my CSS in my CSS and just use JS to add/remove classes, for consistency.

  3. the HTML Dialog element sucks, is not styled the same across browsers and you cannot position it... stick with stuff that works. I use 2 CSS classes, 2 elements, one is an overlay, the other a box i put crap in. Add class "on" to open it [animate however you want] and remove class "on" to close it. The end.

4.a. IndexedDB has its uses for applications that need to store a data set locally for use, but most websites/apps do not need this, localStorage is fine.
4.b. Cache API is nice too, to store endpoint request data... however this is only useful if you don't have data that updates in real time. Eg. product pricing, or game scores, or messages from users, etc etc, so not very useful if you already have a good backend caching setup.

  1. If you're using type="module" you should probably be using a framework...

  2. That is one way of doing toasts. I prefer inserting a new element as needed and removing it when done. Versus always having that empty element hanging around in the DOM, but to each their own.

  3. rel="noopener" on all external links is just good practice. You won't "GET HACKED" if you forget it. Your users might, but chances are it's because they already clicked on something somewhere else first... so relax.

  4. loading=lazy is nice in theory... but in practice the browsers aren't super consistent in behavior, so you generally need to see if it works well enough for you or not.
    I much prefer a custom data-src attribute that replaces the src when an img element is just about to scroll into view, but again, personal preference.

  5. using "defer" always... hm, not sure on that one. I guess it's fine. I can't say for sure there's ZERO issues with doing this ALWAYS.... i mean, it's javascript... something is bound to break it at some point.

Collapse
 
nevodavid profile image
Nevo David

Impressive and very useful tips!

Collapse
 
0x3d_site profile image
0x3d Site

Thanks!!

Collapse
 
fullzero5 profile image
FullZero • Edited
const query = (sel, all = false) => all ? document.querySelectorAll(sel) : document.querySelector(sel);
Enter fullscreen mode Exit fullscreen mode
Collapse
 
nadeem_zia_257af7e986ffc6 profile image
nadeem zia

Good information given

Collapse
 
taogeegi profile image
taogeegi

Great! It's on my list!But there is an integrated all in one web programing environment tool that I also recommend.