Force Google Chrome to Open Links in New Processes

With a new HMTL 5 link attribute implemented in Webkit

When Google decided to create a new browser, it knew it had an opportunity to avoid many of the problems facing existing browsers by coming up with new ways to do things and building a solid basis from the start. One of the smartest decisions was to give each individual tab its own process thread, which would solve a lot of security and stability issues.

It was a more complex technical approach, but it paid off in the end. However, it's not possible to give each tab its own process every time, as there may be shared resources between them, so Chrome had to make a compromise between security and compatibility. Now, though, Google is giving developers the possibility to force links to be opened in new processes thanks to a little HTML 5 trickery.

“Google Chrome already uses separate OS processes to isolate independent tabs from each other in the browser, so that crashes or slowdowns in one tab won't affect the others,” Charlie Reis, software engineer, writes on the Chromium blog.

“In many cases, though, Google Chrome needs to keep pages from related tabs in the same process, since they may access each other's contents using JavaScript code... In practice, web developers may find situations where they would like links to other pages to open in a separate process. As one example, links from messages in your webmail client would be nice to isolate from the webmail client itself,” he explains.

Now, thanks to a new HTML 5 feature that got implemented in the latest builds of the Webkit HTML engine, which powers Chorme, Safari and a bunch of desktop and mobile browsers, developers can make links on their sites open in a new process adding a new level of protection. All they need to do is add the new rel="noreferrer" attribute as well as a target=”_blank” to their links pointing to another domain.

This will tell Chrome, and any other browser sporting a recent Webkit build under the hood and eventually any browser that supports the HTML 5 feature, to open the link in a new tab or window. No referrer information will be sent to the opened site and the window.opener property will be set to NULL. For now, though, there is no possibility to launch the link in a different process but still send referrer information.

Hot right now  ·  Latest news