logo科技微讯

检测电脑浏览器更新

作者:科技微讯
日期:2021-08-27
📝 笔记

版本

桌面端,都有 stable、beta、dev 版本,接下来 chrome、edge 还有 canary,而 firefox 还有 nightly。

对于安卓端:

Chrome

有一个叫 chromiumdash 的网站,该网站来自官方,可以获取各个平台(win、mac、android、linux、ios)的 chrome 的各 branch 的版本信息。这个网站我是通过 homebrew-cask 获知的,但是无法获取下载链接。好在谷歌官方有一个固定的链接可以总是获取最新的版本:苹果芯片intel 芯片,下载链接都可以在 chrome 官网获取。

以下是从 chromiumdash 收集的 Chrome 各平台和 channel 的 API,可获取最新的版本信息:

对于 win Chrome,也可以自行向谷歌服务器发起请求,对于 mac Chrome 可以参考这个 repo

2023/03/07 补充:今天发现谷歌官方有一个用来获取 Chrome 版本信息的 API:VersionHistory API,例子:

const platform = "win";
const channel = "all";
const startTime = new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString();
const filter = `endtime=none,channel<=canary,starttime>=${startTime}`;
const url = `https://versionhistory.googleapis.com/v1/chrome/platforms/${platform}/channels/${channel}/versions/all/releases?filter=${filter}`;

Edge

Microsoft Edge 浏览器官方有 api 获取最新的版本信息,可以获取下载链接。

Firefox

火狐浏览器的版本不同于其他两个浏览器:

  • 正式普通版
  • 延长支持版 ESR
  • Beta
  • Developer
  • Nightly

可以看看火狐的版本发布流程

一站式 API:The Product-Details JSON API

The data provided by this API is meant to be the source of truth for all tools needing to know specific information about a Firefox release or channel.

但我发现它和 google play 可能有偏差,例如 mobile_versions.json 这个是 firefox for android 的版本信息,显示正式版的版本号是 113.0,但在 google play 上的最新正式版是 112.2.0,beta 也是,但 nightly_version 一样。

事实上 mobile_versions.json 更准确,它和 firefox for android 的 github release 是相同的,可能是提交到 google play 需要额外的时间,所以慢一点,可能慢 2 个星期,例如 Firefox Beta 113.0b9 在 github 的发布时间是 4/28,在 play 上是 5/10。可惜的是 github release 没有 nightly 的版本,但可以在 ftp 获取 nightly 版本,fenix 的 apk 都会上传到 ftp。从 ftp 的文件列表来看,nightly 每天都更新,但版本号不一定更新。

火狐桌面端各版本和平台的最新版下载链接,可以参考 moz-download-url 获取。这些链接总是获取最新的版本,访问这些链接会自动跳转到真正的下载链接。这里的安卓版只有 fennec 的下载链接,没有 fenix,而前者似乎不维护了。

火狐官方 mozdownload 也可以获取下载链接。另外 mozilla 有一个 ftp 存放了所有软件的下载,包括 firefox、fenix 等,mozdownload 就是从这个 ftp 上 scrape 信息的。

/* https://wiki.mozilla.org/Release_Management/Product_details
FIREFOX_NIGHTLY is Firefox for Nightly.
FIREFOX_AURORA is empty since we no longer have an Aurora branch.
FIREFOX_ESR_NEXT is usually empty except for a couple of months a year when we have two ESR overlapping and we need to provide both on mozilla.org for download.
LATEST_FIREFOX_DEVEL_VERSION is the latest Firefox Beta built, not necessarily exposed for downloading
FIREFOX_DEVEDITION is Firefox Developer Edition (Beta 1 to 4 in the release cycle)
LATEST_FIREFOX_OLDER_VERSION is unused today, it is the last version we shipped before we moved to the Rapid Release cycle
LATEST_FIREFOX_RELEASED_DEVEL_VERSION is the validated latest Firefox Beta built, exposed for downloading
LATEST_FIREFOX_VERSION is the Firefox Version we ship on the release channel 
*/
//关于每一个字段的意思,更详细的描述:https://github.com/mozilla-releng/shipit/blob/main/api/src/shipit_api/common/config.py
{
  "FIREFOX_AURORA": "",
  "FIREFOX_DEVEDITION": "92.0b9", //dev 版本,发布时间:https://product-details.mozilla.org/1.0/firefox_history_development_releases.json
  "FIREFOX_ESR": "78.13.0esr", //esr 版本,如果 FIREFOX_ESR_NEXT 是空就用这个,否则用 FIREFOX_ESR_NEXT,发布时间:https://product-details.mozilla.org/1.0/firefox_history_stability_releases.json
  "FIREFOX_ESR_NEXT": "91.0.1esr",
  "FIREFOX_NIGHTLY": "93.0a1", //nightly 版本
  "LAST_MERGE_DATE": "2021-08-09",
  "LAST_RELEASE_DATE": "2021-08-10",
  "LAST_SOFTFREEZE_DATE": "2021-08-05",
  "LATEST_FIREFOX_DEVEL_VERSION": "92.0b9",
  "LATEST_FIREFOX_OLDER_VERSION": "3.6.28",
  "LATEST_FIREFOX_RELEASED_DEVEL_VERSION": "92.0b9", //beta,可以下载的,发布时间:https://product-details.mozilla.org/1.0/firefox_history_development_releases.json
  "LATEST_FIREFOX_VERSION": "91.0.2", //最新正式版,发布时间:https://product-details.mozilla.org/1.0/firefox_history_stability_releases.json
  "NEXT_MERGE_DATE": "2021-09-06",
  "NEXT_RELEASE_DATE": "2021-09-07",
  "NEXT_SOFTFREEZE_DATE": "2021-09-02"
}

fenix 没有下面这里链接,这些链接只有桌面端才有。以下链接其实都会跳转到 ftp 获取最终的文件下载链接。android 版本可以通过 mobile_versions.json 获得最新的 android 版本,然后自行拼接 ftp 链接获取这些版本的下载链接。

const url_linux = {
  link: "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=zh-CN",
  branch: "release",
  platform: "linux",
};

const url_mac = {
  link: "https://download.mozilla.org/?product=firefox-latest-ssl&os=osx&lang=zh-CN",
  branch: "release",
  platform: "mac",
};

const url_win = {
  link: "https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=zh-CN",
  branch: "release",
  platform: "windows",
};
const url_linux_esr = {
  link: "https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=linux64&lang=zh-CN",
  branch: "esr",
  platform: "linux",
};

const url_mac_esr = {
  link: "https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=osx&lang=zh-CN",
  branch: "esr",
  platform: "mac",
};
const url_win_esr = {
  link: "https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=win64&lang=zh-CN",
  branch: "esr",
  platform: "windows",
};
const url_linux_beta = {
  link: "https://download.mozilla.org/?product=firefox-beta-latest-ssl&os=linux64&lang=zh-CN",
  branch: "beta",
  platform: "linux",
};
const url_mac_beta = {
  link: "https://download.mozilla.org/?product=firefox-beta-latest-ssl&os=osx&lang=zh-CN",
  branch: "beta",
  platform: "mac",
};
const url_win_beta = {
  link: "https://download.mozilla.org/?product=firefox-beta-latest-ssl&os=win64&lang=zh-CN",
  branch: "dev",
  platform: "windows",
};
const url_linux_dev = {
  link: "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=zh-CN",
  branch: "dev",
  platform: "linux",
};
const url_mac_dev = {
  link: "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=osx&lang=zh-CN",
  branch: "dev",
  platform: "mac",
};
const url_win_dev = {
  link: "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=win64&lang=zh-CN",
  branch: "dev",
  platform: "windows",
};
const url_linux_nightly = {
  link: "https://download.mozilla.org/?product=firefox-nightly-latest-l10n-ssl&os=linux64&lang=zh-CN",
  branch: "nightly",
  platform: "linux",
};
const url_mac_nightly = {
  link: "https://download.mozilla.org/?product=firefox-nightly-latest-l10n-ssl&os=osx&lang=zh-CN",
  branch: "nightly",
  platform: "mac",
};
const url_win_nightly = {
  link: "https://download.mozilla.org/?product=firefox-nightly-latest-l10n-ssl&os=win64&lang=zh-CN",
  branch: "nightly",
  platform: "nightly",
};
[
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/91.0.2/linux-x86_64/zh-CN/firefox-91.0.2.tar.bz2",
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/91.0.2/mac/zh-CN/Firefox%2091.0.2.dmg",
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/91.0.2/win64/zh-CN/Firefox%20Setup%2091.0.2.exe",
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/92.0b9/linux-x86_64/zh-CN/firefox-92.0b9.tar.bz2",
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/92.0b9/mac/zh-CN/Firefox%2092.0b9.dmg",
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/92.0b9/win64/zh-CN/Firefox%20Setup%2092.0b9.exe",
  "https://download-installer.cdn.mozilla.net/pub/devedition/releases/92.0b9/linux-x86_64/zh-CN/firefox-92.0b9.tar.bz2",
  "https://download-installer.cdn.mozilla.net/pub/devedition/releases/92.0b9/mac/zh-CN/Firefox%2092.0b9.dmg",
  "https://download-installer.cdn.mozilla.net/pub/devedition/releases/92.0b9/win64/zh-CN/Firefox%20Setup%2092.0b9.exe",
  "https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-93.0a1.zh-CN.linux-x86_64.tar.bz2",
  "https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-93.0a1.zh-CN.mac.dmg",
  "https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central-l10n/firefox-93.0a1.zh-CN.win64.installer.exe",
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/78.13.0esr/linux-x86_64/zh-CN/firefox-78.13.0esr.tar.bz2",
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/78.13.0esr/mac/zh-CN/Firefox%2078.13.0esr.dmg",
  "https://download-installer.cdn.mozilla.net/pub/firefox/releases/78.13.0esr/win64/zh-CN/Firefox%20Setup%2078.13.0esr.exe",
];
donation赞赏
thumbsup0
thumbsdown0
暂无评论