How to encode URL in JS?

Small tutorial with code examples about how to encode URL in JavaScript safely
31 October 2017   1912

For example, you have and URL that need to be encoded safely using JavaScript such way such that it can be put into a GET string.

var myUrl = "http://example.com/index.html?param=1&anotherParam=2";
var myOtherUrl = "http://example.com/index.html?url=" + myUrl;

Use the built-in function encodeURIComponent(str) and encodeURI(str)

var myOtherUrl = 
       "http://example.com/index.html?url=" + encodeURIComponent(myUrl);

Microsoft to Use Chromium for Edge Browser

The company has already placed the repository on GitHub to attract new members to the development of the browser
07 December 2018   147

Microsoft Vice President Joe Belfiore said that from December 6, 2018, the company will use the Chromium engine in the Microsoft Edge browser. According to him, Microsoft also plans to develop browsers for smartphones and other devices.

The company has already placed the repository on GitHub to attract new members to the development of the browser. Microsoft expects that the transition to the new engine will be a big step in the development of Microsoft Edge. For example, the browser will finally be adapted for macOS.

According to Belfiore, the company plans to improve the project in three areas:

  • Users will get hardware integration, improved browser compatibility with sites and reduced power consumption of devices when using it.
  • Web developers will appreciate the reduced fragmentation of a web platform for testing sites.
  • The corporate IT sector will get the compatibility of old and new Windows applications that run in the browser.

He noted that during the year the company would work “under the hood” of Microsoft Edge, and named several key stages of this process. For example, the transition to a platform compatible with the Chromium engine for developing a desktop version of the browser. It is also planned that most platforms and all versions of Windows will support Microsoft Edge.