The link named 'crashsafari.com' crashes the browser by writing thousands of characters in the address bar every second, thus exhausting its memory, a website reported on Monday.

The attack is just four lines of code that can crash both Safari or Chrome browser, or reboot the entire phone itself. It even works against some desktop browsers.

It leverages HTML5's history.pushState, a JavaScript function used by many single page applications to update the address bar, even though the underlying page being viewed does not change.

The link is being shared on social media disguised by a short URL, to trick others into opening it and leave them unable to open their browsers until a reboot is completed, the report said.