Because it’s simple
Let’s check how we can use Svelte and vanilla js to create something like this with ease.
Of course, we need native JS event handling and canvas to paint.
We need canvas element and mousedown event. We need to…
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.
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.
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.
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…