+ fetch(url, {
+ method: "HEAD",
+ cache: "no-cache",
+ credentials: "include",
+ })
+ .then((response) => {
+ if (!response.ok) {
+ throw Error(response.statusText);
+ }
+ this.status = "online";
+ })
+ .catch(() => {
+ this.status = "offline";
+ });