You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在HTML超链接中指定Chrome浏览器?尝试前缀后报错求助

Great question! Let's break down what's going on here and what your options are:

Why google-chrome:/chrome: isn't working

Unlike Edge, which has an officially supported and system-registered microsoft-edge: URL protocol prefix by default, Chrome does not come with a pre-registered google-chrome: or chrome: protocol on Windows (or most other OSes). That's exactly why you're seeing the error:

There is no program associated to perform the requested action.

Your system has no idea which app should handle that custom protocol, since Chrome doesn't set this up automatically during installation.

Is this request feasible?

Short answer: Not natively, without extra setup

You can't force a link to open in Chrome via a simple HTML prefix like Edge's, unless you or your users take additional steps:

  • Manual protocol registration (admin/advanced users): On Windows, you could manually add registry entries to associate google-chrome: with the Chrome executable. For example, you'd add keys under HKEY_CLASSES_ROOT\google-chrome pointing to chrome.exe "%1". This works, but it's not something you can rely on for general users (especially in email, where recipients won't have this setup).
  • Set Chrome as default browser: If Chrome is the user's default browser, regular http:///https:// links will open in Chrome automatically. But this is a user-controlled setting—you can't enforce it via HTML in an email.

Since you're linking to a local program/localhost service, here are a couple of practical alternatives:

  • Use a regular http://localhost:... link: If Chrome is the default browser, this will open there. If not, you can add a note in the email like "If this doesn't open in Chrome, copy the link and paste it into your Chrome address bar".
  • Chrome App/Shortcut (for internal use): If this is for an internal team, you could package the localhost service as a Chrome App or create a desktop shortcut that launches Chrome directly to that URL. Then you can share the shortcut (though this doesn't work directly in email).

内容的提问来源于stack exchange,提问作者conjenks

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 07:22:34