{
  "id": 20414237,
  "title": "How I Built a Real-Time Display Refresh Rate Tester Using Astro.js & requestAnimationFrame",
  "url": "https://urgent.news/2026/11/17/how-i-built-a-real-time-display-refresh-rate-tester-using-astro-js",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-17T10:05:24.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/refreshrate/how-i-built-a-real-time-display-refresh-rate-tester-using-astrojs-requestanimationframe-5fb1"
  },
  "original_language": "en",
  "account": "In the realm of developers, gamers, and tech enthusiasts, a prevalent issue arises: despite operating system settings indicating a high refresh rate such as 144Hz, the actual browser performance may fail to match that speed. Various factors, including faulty HDMI/DP cables, incorrect GPU settings, or browser hardware acceleration problems, can quietly throttle the frame rate down to 60Hz. Seeking a swift, installation-free method to verify genuine screen refresh rate right within the browser, the author decided to create their own solution. Hence, they introduce the Refresh Rate Tester tool.\n\nWith the objective of constructing an exceptionally fast and lightweight tool, the author chose the following technology stack: Astro.js for an optimized, static foundation that avoids constant JavaScript execution, Tailwind CSS for responsive, clean styling adaptable to both desktop and mobile devices, and Vanilla JavaScript for the core functionality.\n\nAt its core, the tool relies on the browser's native requestAnimationFrame API. This method eschews the attempt to read system-level hardware settings, which browsers generally cannot access due to security concerns. Instead, it quantifies the time interval between consecutive screen repaints. The following code snippet illustrates the logic:\n\n```javascript\nlet frameCount = 0;\nlet lastTime = performance.now();\nlet currentHz = 0;\n\nfunction calculateRefreshRate() {\nlet now = performance.now();\nframeCount++;\nif (now - lastTime >= 1000) {\ncurrentHz = frameCount;\nconsole.log(`Current Refresh Rate: ${currentHz} Hz`);\nframeCount = 0;\nlastTime = now;\n}\nrequestAnimationFrame(calculateRefreshRate);\n}\n\nrequestAnimationFrame(calculateRefreshRate);\n```\n\nBy documenting the number of frames the browser manages to render in a single second, the tool accurately determines the screen's refresh rate (measured in Hertz). All processing occurs on the client side, eliminating any dependency on server latency and ensuring precise results. Users can instantly assess their display's refresh rate through the following link: https://refreshrate.net.\n\nThe author invites feedback regarding the UI design, performance, and any proposed features, such as motion blur or frame skipping tests. They encourage readers to share their findings, specifically noting the Hz their current screen operates at.",
  "summary": "As developers, gamers, and tech enthusiasts, we often invest in high refresh rate monitors (120Hz, 144Hz, or even 240Hz). But here is a common problem: just because your operating system settings say 144Hz doesn't mean your browser is actually rendering at that speed. Sometimes, a faulty HDMI/DP cable, incorrect GPU settings, or browser hardware acceleration issues can silently cap your frame…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}