⚖ Compare news

Put up to three stories side by side. Pick IDs from any article URL: /compare?id=123&id=456

Что расширение Chrome может узнать о сайте, а что нет: грабли Manifest V3

habrahabr.ru ·Russian Federation · world
Words
71
Chars
460
AI summary
Yes
Full story

A developer built a Chrome extension that displays a page's response code on its icon. Clicking the icon shows redirects, response time, and SSL certificate and domain expiry. The task looked simple, but several features ran into Chrome's restrictions. Chrome does not hand the certificate to the extension even though the API is described in documentation, and the expiry date of a .ru domain cannot be checked from the browser. The background script also goes to sleep after 30 seconds.

Я написал расширение, которое показывает код ответа страницы на значке, а по нажатию: редиректы, время ответа, срок SSL-сертификата и домена. Задача выглядела простой, но половина пунктов упёрлась в ограничения Chrome. Сертификат расширению не отдают, хотя API для этого описан в документации. Срок домена в зоне .ru из браузера не узнать. Фоновый скрипт засыпает через 30 секунд. Рассказываю, что работает, что нет и чем я это заменил. Что работает, а что нет

Open article