Because it’s simple

There is a nice article on how to use mouse drag with rxjs. With the modern javascript frameworks and libraries, we got to the point where is hard to do simple things. We don’t need rxjs, all we need is vanilla js. Svelte is just a cherry on the top.
Let’s check how we can use Svelte and vanilla js to create something like this with ease.

What we need:

  1. 😊 Svelte
  2. 😉 Nothing else
  3. 😎 Nothing else

Of course, we need native JS event handling and canvas to paint.

We need canvas element and mousedown event. We need to…

or how to compare dates in Javascript

I stumbled upon the blog post named You Cannot Compare Dates In Javascript.
The title is a bit misleading and it doesn’t give a reason, why we can’t compare them. Maybe we should not compare Date objects directly, but we can and should compare dates with Javascript.

My previous story on this topic was:
How to bypass “slider CAPTCHA” with JS and Puppeteer

In this story, I will go further to solve slider captcha with a different technique. This technique will solve the slider captcha faster and more efficiently. My focus will be on GeeTest slider captcha, but you could apply it to any other similar slider captcha. I will show you how to bypass it in a few steps.

1. Get images

Let’s go to the GeeTest website. Our puppeteer script needs to wait a bit for images to load. …

Don’t just blindly change your User-Agent header.

When scraping, we want to do a few things. Scrape slowly (but fast enough), use proxy, rotate ip address and rotate User-Agent header. With this, we may go unnoticed.

User-Agent header is one of the most abused headers by those who are scraping. And it’s all because of UA sniffing.

It’s all great if we just fetch HTML and parse it with cheerio. There is no one to check us. Now, we need to scrape a website with JS enabled, because website is doing black magic client side rendering.

We setup Puppeteer JS…

Next story on same topic - How to solve GeeTest “slider CAPTCHA” with JS

Spam is a huge problem for website owners. On the other hand, CAPTCHAs drives me crazy and they are bad for user experience.

CAPTCHA sucks. Let’s face it. There are a lot of ways to verify humans and every method sucks.

In recent years bots are becoming smarter every day and it is hard to defend website from bots. With a lot of spare time and enough resources, we can bypass almost any CAPTCHA. There are plugins for Puppeteer to solve reCAPTCHA. There are companies that…

Parallax technique is not new. Few years ago parallax could end up implemented wrong, with jank. Now it’s 2019, browsers are great enough.

There are plenty of examples in the wild. There are also lots of libraries.
Parallax technique can be done with only CSS or with CSS+JS.

Here, I will show you how parallax is easy to implement with CSS variables and I will flavor it with just a little bit of vanilla JS.

I was scrolling through some dribbble shots and I came across some really sleek parallax prototypes made by giulio_cuscito and dennissnellenberg.

Let’s build it

If you have photoshop…

There are so many posts about lazy loading images, I will bring nothing new to the table. But if you haven’t considered lazy loading yet, here are 3 quick and easy techniques to make web pages faster.


I understand that there are websites that will have lots of images by their nature. But I can’t believe that there are websites made by tech companies that load 5MB-10MB of images, just because it’s easier / faster / cheaper to develop that way.

You searched how to tree shake with Parcel and didn’t find it. It’s quick and easy. Every ones in a while we start some project and we start importing libraries. Project start to grow more and more and then we take a look how big our bundle is, and it’s huge. We don’t want to bundle code we don’t use, right? Let’s see how we can bring it down.


As of parcel v1.9.0 use cli option --experimental-scope-hoisting

parcel build index.html -d build --experimental-scope-hoisting


Although, you don’t need lodash in a first place, lodash has all those handy util functions we…

You know that something is wrong when your tests are slow, unstable and ignored. Did I mention unmaintainable and hard to write? And finally how easy/hard is to setup your testing environment?

Writing tests is usually painful and boring task, but I knew we can do it better. So lets check how we can do it in JS. I started evaluating few tools in order to show power of JS. Sure, JS ecosystem is so volatile, when you finish with reading of this post, maybe new/shiny tool will popup (or not).


With Puppeteer you can automate literally everything. We can…

When ES6 (ES2015) standard came out, it was overwhelming to check all new cool language features and to start using them asap. Although new features were awesome, ES6 was huge step forward and browsers needed quite some time to implement them.

Now, years later, Javascript is in much better state. Javascript will continue it’s improvement and each browser has it’s on part in this process.

Looking back at 2017, I would say async/await was single most useful feature.

Now, it’s almost mid 2018, and it’s time to see what is coming in near future. So, lets check at kangax table

Filip Vitas

Coffee Driven Software Developer @SBGenomics

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store