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

Improve SVN logging

posted in Other on 2012-09-27   log v xml svn log v sed e s revprops l g sed e msg author date egrep msg author

svn log - that\\'s something that I\\'m using every day. Before to release the application\\'s code in the production environment I always check the latest commits just to make sure that is safety to proceed. svn log is far from the perfect command for the purpose, but with several tweaks you can get the needed information.

read more

Speed Up Your JavaScript

posted in JavaScript on 2012-04-26   javascript 2nd edition wrox contributor author slow

As an interpreted language, JavaScript is filled with hidden performance issues that conspire to slow down your code and ruin the user experience. Learn exactly what is fast, what is slow, and what you can do to squeeze that last bit of performance out of your JavaScript code.

read more