1

I have created a webpage that works best with Chrome. If the user opens this page from Safari, I want to put a button that says "Click here to open this page in Chrome". Upon clicking this button, Chrome should fireup and load the specified URL.

Is there a way to do that? Or even just to launch Chrome from Safari?

Amarsh
  • 11,214
  • 18
  • 53
  • 78
  • there is no way to do this – Jaromanda X Jun 28 '17 at 02:22
  • 1
    No, there is no way to execute a program from a browser action alone. The user would either need a plugin installed in the browser to allow for that, or OS/Browser that had some kind of url scheme setup to do such (eg how mail: url scheme can launch default mail app). Which by default they do not – Patrick Evans Jun 28 '17 at 02:22

2 Answers2

1

There actually is a way, if you want to do this, make the button, and set the href to the link, but at the beginning, delete ‘https://‘ and replace it with ‘googlechromes://’, for example ‘googlechromes://YouTube.com’ if you go to that link in safari, it will ask, “do you want to open this page in chrome?” And if you click yes it will open chrome over safari

TullyYT
  • 11
  • 1
0

There is no way to this within the browser, but here a few work-arounds. You could ...

  • Make a button to copy your URL to their clipboard so they can paste it in Chrome
  • Send the user to a download link if they don't have chrome (just ask them if they have chrome or not)
  • Close the tab in the browser after the URL is copied
    • You could use window.close() or just close(), as pointed out in this answer.

These are just some thoughts. It's the best anyone could do for a problem like this. I hope this helps.

clabe45
  • 2,354
  • 16
  • 27