Watch out for a new prank circling Twitter and other social media today. Visiting CrashSafari.com on an iPhone, iPad or Mac will cause Safari app to crash … and potentially cause your device to restart. The bug is otherwise harmless, but be warned it will likely cause you to lose your open tabs.

To try this out click here to visit the page and watch for the beachball. The current troll is to link to CrashSafari.com on Twitter using a URL shortener, so people are tricked into visiting the site without being able to see the name.

iphone-fire

On the Mac, Safari will freeze (‘Application Not Responding’). You may need to restart your machine to get your browser working again. On some iPhones and iPads, the glitch may cause your iOS device to reboot. So how does this prank work?

The code of the CrashSafari site is very simple. The page includes a header title (which you’ll never actually see because the browser crashes) and a small piece of JavaScript. The JavaScript calls the HTML5 History API thousands of times in a loop, essentially causing Safari to freeze.

Screen Shot 2016-01-25 at 15.15.08

The History API is what allows modern websites to change the URL of the page without causing a refresh: scroll 9to5Mac’s homepage and you’ll see the text in the URL bar change. The person behind this site has found that you can cause a crash by abusing the API and calling it thousands of times in quick succession.

You can activate it by browsing to the URL directly as well as clicking on links in apps, like tapping on a link shared over Facebook and Twitter. Depending on how the website is opened, it will either crash the current app, the Safari browser, or the whole of system.

The ‘hack’ has been seen to work on the latest versions of Apple’s operating systems, iOS 9.2.1 and OS X 10.11.3, as well as some of the beta seeds. Wihle we would expect Apple to fix the problem in a future update, there is no immediate rush as the site does not compromise the system at all and poses no practical security risk. Just a major inconvenience if you’re forced to reboot.