Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

The simplest HTTP proxy with custom headers

posted in Nodejs on 2020-05-06   proxy headers authorization node local request server req http basic pass

These days I had an interesting problem to solve. At work, on our staging environment, we have basic authorization. It works really well but for some older versions of Chrome we experienced a weird issue. The browser did not pass the authorization header. The app runs fine but as soon as it does a fetch request to a local endpoint the request fails with 401 not-authorized error. In the modern browsers that's not happening because the browser kinda knows that we came here with basic auth and automatically includes authorization: basic ... header.

read more

Using Local Storage as a communication channel

posted in JavaScript on 2015-05-05   namespace data localstorage function var storage loop browser buffer namespace

So it's been a few months since I published something here. It’s not because I’m lazy (that’s true though) but because I was working on my second book. Now the book is almost finished and I’ll start actively blogging again. In this article we’ll see how to use the local storage of the browser as a communication channel.

read more

Deploying ExpressionEngine based site

posted in PHP on 2013-06-25   php file database config files dblogger sql local operations define

I found ExpressionEngine framework very good. It brings the flexibility which I need and still has a good amount of features. However, as many other similar tools, the deployment could be a little bit difficult.

read more

Importing huge MySQL dump under Windows.

posted in PHP on 2013-06-17   mysql dump table hugedump sql sql table hugedump root h localhost u root h mysql command

I just received a 250MB dump of a database and I needed to see what is it inside. As you may guess, PHPMyAdmin is not a good option in this case. I decided to use the command line.

read more