PageSourceSearch

https://www.debugbear.com/cdn/chunk-resource-hints-validator.c5fe2ae00e33d2088274.js

js debugbear.com collected 2026-09-24 08:55:16 UTC 13,514 bytes, 1 lines download raw bytes

1"use strict";(("undefined"==typeof window?self:window).webpackChunkdebugbear_gae=("undefined"==typeof window?self:window).webpackChunkdebugbear_gae||[]).push([[7879],{30760(e,t,s){s.r(t),s.d(t,{ResourceHintsValidator:()=>x}),s(62953);var r=s(38478),a=s(47490),o=s(72737),n=s(11178),i=s(57463),l=s(67707),c=s(94759),d=s(58233),u=s(96540),h=s(76213);const m=[{status:"ok",type:"preload",href:"Preloading is not excessive: found 3 preload hints",source:"",as:null,crossOrigin:null,imageSrcset:null,media:null,expectedRequest:{url:"",cors:!1,crossSite:!1,bytes:73738},otherRequest:null,validation:{status:"ok",checks:[{status:"ok",message:"Found 0 JS/CSS preload hints (0 B)"},{status:"ok",message:"Found 3 font preload hints (72.0 KB)"},{status:"ok",message:"Found 0 image preload hints (0 B)"}]}},{type:"preload",href:"/fonts/google-sans/regular/latin.woff2",as:"font",crossOrigin:"anonymous",imageSrcset:null,media:null,source:"dom",status:"ok",expectedRequest:{url:"https://web.dev/fonts/google-sans/regular/latin.woff2",cors:!0,crossSite:!1,credentials:!0,type:"font",resourceType:"font",bytes:14576,timeOffset:254.5,reportedUnused:!1},otherRequest:null,validation:{status:"ok",checks:[{status:"ok",message:"The URL is valid."},{status:"ok",message:"The value 'font' is valid for the 'as' attribute."},{status:"ok",message:"The browser loaded a resource that matches this hint.",detail:'Found a request to "https://web.dev/fonts/google-sans/regular/latin.woff2".'}]}},{type:"preload",href:"/fonts/google-sans/bold/latin.woff2",as:"font",crossOrigin:"anonymous",imageSrcset:null,media:null,source:"dom",status:"ok",expectedRequest:{url:"https://web.dev/fonts/google-sans/bold/latin.woff2",cors:!0,crossSite:!1,credentials:!0,type:"font",resourceType:"font",bytes:14488,timeOffset:255.9,reportedUnused:!1},otherRequest:null,validation:{status:"ok",checks:[{status:"ok",message:"The URL is valid."},{status:"ok",message:"The value 'font' is valid for the 'as' attribute."},{status:"ok",message:"The browser loaded a resource that matches this hint.",detail:'Found a request to "https://web.dev/fonts/google-sans/bold/latin.woff2".'}]}},{type:"preconnect",href:"https://web-dev.imgix.net",as:null,crossOrigin:null,imageSrcset:null,media:null,source:"dom",status:"ok",expectedRequest:{url:"https://web-dev.imgix.net/image/jxu1OdD7LKOGIDU7jURMpSH2lyK2/zrBPJq27O4Hs8haszVnK.svg",cors:!1,crossSite:!0,credentials:!0,type:"image",resourceType:"image",bytes:2109,timeOffset:314,reportedUnused:!1},otherRequest:null,validation:{status:"ok",checks:[{status:"ok",message:"The URL is valid."},{status:"ok",message:"The browser loaded a resource that matches this hint.",detail:'Found a request to "https://web-dev.imgix.net/image/jxu1OdD7LKOGIDU7jURMpSH2lyK2/zrBPJq27O4Hs8haszVnK.svg".'}]}},{type:"preload",href:"/fonts/material-icons/regular.woff2",as:"font",crossOrigin:"anonymous",imageSrcset:null,media:null,source:"dom",status:"ok",expectedRequest:{url:"https://web.dev/fonts/material-icons/regular.woff2",cors:!0,crossSite:!1,credentials:!0,type:"font",resourceType:"font",bytes:44300,timeOffset:262.7,reportedUnused:!1},otherRequest:null,validation:{status:"ok",checks:[{status:"ok",message:"The URL is valid."},{status:"ok",message:"The value 'font' is valid for the 'as' attribute."},{status:"ok",message:"The browser loaded a resource that matches this hint.",detail:'Found a request to "https://web.dev/fonts/material-icons/regular.woff2".'}]}}];var f=s(74848);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var s=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=s){var r,a,o,n,i=[],l=!0,c=!1;try{if(o=(s=s.call(e)).next,0===t){if(Object(s)!==s)return;l=!1}else for(;!(l=(r=o.call(s)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=s.return&&(n=s.return(),Object(n)!==n))return}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?g(e,t):void 0}}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=Array(t);s<t;s++)r[s]=e[s];return r}function x(){const e=p(u.useState("idle"),2),t=e[0],s=e[1],g=p(u.useState(m),2),x=g[0],b=g[1],v=p(u.useState(""),2),w=v[0],y=v[1],j=(0,r.I)(),k=(0,h.Zp)(),S=j.get("url");return u.useEffect(()=>{var e;S&&(e=S,s("loading"),fetch(location.hostname.includes("localhost")?`http://localhost:${null!=="7089"?"7089":7089}/`:"https://resourcehints-u3wpyc4i6q-ue.a.run.app/",{method:"POST",body:JSON.stringify({url:e}),headers:{Accept:"application/json","Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{if(e.error)throw new Error(e.error);return e}).then(e=>{b((0,c.M)(e.hints)),y(e.screenshot),s("idle")}).catch(e=>{console.error(e),s("error")}))},[S]),(0,f.jsxs)(n.K7,{isFullWidthWithoutSidebar:!0,padded:!1,contentContainerClassName:"py-3",children:[(0,f.jsx)("h1",{className:"scale-1 font-weight-normal color-blue1 mb-3 px-3",children:"Browser Resource Hint Validator"}),(0,f.jsxs)("p",{className:"px-3",children:[(0,f.jsx)("a",{href:"/blog/resource-hints-rel-preload-prefetch-preconnect",target:"_blank",children:"Resource hints"})," ","allow developers to tell the browser about network resources before they are naturally discovered during the page load process. This tool checks if they are working correctly."]}),(0,f.jsx)(d.l1,{initialValues:{url:S||""},onSubmit:e=>{let t=e.url;t&&(j.set("url",t),k(location.pathname+"?"+j.toString()))},children:(0,f.jsx)(d.lV,{className:"wide-form px-3",children:(0,f.jsxs)("div",{className:"d-flex",style:{maxWidth:720},children:[(0,f.jsx)(d.D0,{"data-test-url-input":!0,name:"url",validate:l.hy,placeholder:"https://web.dev",className:"mr-3 scale-4"}),(0,f.jsx)(a.b,{testName:"url-input-form-submit",title:"loading"===t?"Validating...":"Run Validation",isSubmitting:"loading"===t})]})})}),"error"===t&&(0,f.jsx)("div",{className:"mt-3 alert alert-danger ml-3 mr-3",children:"Something went wrong, please try again."}),"loading"===t&&(0,f.jsxs)("div",{className:"p-2 my-3 ml-3",style:{background:"#f0f7ff",display:"inline-block",borderRadius:4},children:[(0,f.jsx)("h2",{children:"Monitor resource hints and overall site performance"}),(0,f.jsx)("p",{children:"DebugBear can track Core Web Vitals over time and alert you to broken browser resource hints."}),(0,f.jsx)("a",{href:"/",className:"btn btn-primary",target:"_blank",rel:"noopener",children:"Learn more"})]}),x&&"idle"===t&&(0,f.jsxs)("div",{"data-test-results":!0,children:[(0,f.jsx)("h2",{className:"scale-3 font-weight-normal color-blue1 mt-4 px-3",children:"Test result"}),0===x.length?(0,f.jsx)("div",{className:"px-3",children:"No resource hints found."}):(0,f.jsx)(i.f,{standalone:!0,hintValidations:x}),w&&(0,f.jsxs)("div",{className:"px-3",children:[(0,f.jsx)("h2",{className:"scale-3 font-weight-normal color-blue1 mt-4",children:"Screenshot"}),(0,f.jsx)("img",{src:w,style:{width:600,maxWidth:"100%",boxShadow:"0px 0px 2px #aaa"}})]})]}),(0,f.jsx)("div",{className:"p-2",children:(0,f.jsx)(o.U,{})})]})}},84221(e,t,s){s.d(t,{k:()=>l});var r=s(90317),a=s(72126),o=s(9254),n=s(39625),i=s(74848);function l(e){switch(e.status){case"indeterminate":return(0,i.jsx)(a.I,{className:"text-muted flex-no-shrink mr-2"});case"error":return(0,i.jsx)(n.h,{"data-test-x-icon":!0,className:"flex-no-shrink mr-2"});case"warning":return(0,i.jsx)(o.i,{"data-test-x-icon":!0,className:"flex-no-shrink mr-2"});default:return(0,i.jsx)(r.P,{className:"text-success flex-no-shrink mr-2"})}}},72737(e,t,s){s.d(t,{U:()=>d});var r=s(47166),a=s(90317),o=s(10242),n=s(77678),i=s(59880),l=s(32304),c=s(74848);function d(){const e=[{href:"/test/website-speed",title:"Website Speed Test",imagePath:"oneOffTests/ogImage-new.png"},{href:"/html-size-analyzer",title:"HTML Size Analyzer",imagePath:"html-size-analyzer-updated.png"},{href:"/site-speed-chrome-extension",title:"Site Speed Extension",imagePath:"ogImage/chrome-extension-new.png"},{href:"/resource-hint-validator",title:"Resource Hint Validator",imagePath:"resourceHints/og-image.png"},{href:"/test/ttfb",title:"TTFB Test",imagePath:"free-tools/ttfb-test.png"},{href:"/test/noscript",title:"NoScript Test",imagePath:"free-tools/noscript-test.png"},{href:"/json-size-analyzer",title:"JSON Size Analyzer",imagePath:"free-tools/json-size-analyzer.png"}].filter(e=>!location.href.includes(e.href)).slice(0,6),t={border:"1px solid #eee",borderRadius:4,boxShadow:"0 0 10px rgba(0,0,0,0.1)"};return(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"mt-3 p-3 border-color-eee",style:{maxWidth:900,...t},children:[(0,c.jsx)("h3",{children:"Optimize Website Performance"}),(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col-md-12",children:[(0,c.jsxs)("p",{children:["DebugBear is a web performance monitoring tool that helps you"," ",(0,c.jsx)("strong",{children:"keep your website fast and deliver a great user experience"}),"."]}),(0,c.jsxs)("div",{className:"row",children:[(0,c.jsxs)("div",{className:"col-md-6",children:[["Identify slow pages on your website","Improve page speed and Core Web Vitals","Get alerted to regressions"].map(e=>(0,c.jsxs)("div",{className:"d-flex align-items-center mb-1",children:[(0,c.jsx)("div",{className:"d-flex",children:(0,c.jsx)(a.P,{className:"mr-2",style:{color:"#28a745"}})}),(0,c.jsx)("div",{children:e})]},e)),(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{className:"mt-3 mb-2",children:"Get Comprehensive Performance Insights:"}),(0,c.jsx)("div",{children:[{tile:"Synthetic monitoring",icon:i.c,tooltip:"Run scheduled performance tests to track page speed and Google Lighthouse scores over time.",href:"/synthetic-website-monitoring"},{tile:"Google CrUX data",icon:r.K,tooltip:"View the real user metrics from Google Chrome User Experience Report (CrUX) that impact SEO.",href:"/google-crux-monitoring"}
1,{tile:"Real user monitoring (RUM)",icon:n.k,tooltip:"Collect real user performance data to understand how your site performs for actual visitors.",href:"/real-user-monitoring"}].map(e=>{let t=e.tile,s=e.icon,r=e.tooltip,a=e.href;return(0,c.jsxs)("div",{className:"d-flex align-items-center mb-1",children:[(0,c.jsx)("div",{className:"d-flex mr-2",children:(0,c.jsx)(s,{})}),(0,c.jsxs)("div",{children:[t," ",(0,c.jsx)(l.c,{content:r,href:a})]})]},t)})})]}),(0,c.jsx)("div",{className:"mt-3",children:(0,c.jsxs)("a",{href:"/signup?utm_campaign=free-tools-cta",className:"btn btn-primary d-inline-flex align-items-center",style:{fontWeight:"500"},onClick:()=>{window.plausible("Click Free Tools Signup CTA")},target:"_blank",rel:"noreferrer",children:[(0,c.jsx)(o.A,{size:12}),(0,c.jsx)("div",{className:"ml-2",children:"Start Free Trial"})]})})]}),(0,c.jsx)("div",{className:"col-md-6",children:(0,c.jsx)("img",{style:{maxWidth:"100%",borderRadius:4,boxShadow:"0 0 10px rgba(0,0,0,0.2)"},src:"https://www.debugbear.com/dimg/f66a60a5cc2c3273ed6c080a00970e66.png"})})]})]})})]}),(0,c.jsxs)("div",{style:{maxWidth:900,...t},className:"p-3 border-color-eee mt-3",children:[(0,c.jsx)("h3",{className:"mb-0",children:"More Free Tools"}),(0,c.jsx)("div",{className:"row",children:e.map(e=>(0,c.jsx)("div",{className:"col-md-4 mt-3",children:(0,c.jsxs)("a",{href:e.href,children:[(0,c.jsx)("img",{src:`https://dbb.imgix.net/${e.imagePath}?q=100&height=261`,style:{width:"100%",borderRadius:4,boxShadow:"0 0 10px rgba(0,0,0,0.2)"}}),(0,c.jsx)("h4",{className:"mt-3 mb-0",style:{fontSize:18},children:e.title})]})},e.title))})]})]})}},72126(e,t,s){s.d(t,{I:()=>o});var r=s(74848);const a=["fill","size"];function o(e){let t=e.fill,s=void 0===t?"currentColor":t,o=e.size,n=void 0===o?16:o,i=function(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;s[r]=e[r]}return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)s=o[r],-1===t.indexOf(s)&&{}.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}(e,a);return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,fill:"currentColor",viewBox:"0 0 16 16",style:{fill:s},...i,children:(0,r.jsx)("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-4.646-2.646a.5.5 0 0 0-.708-.708l-6 6a.5.5 0 0 0 .708.708l6-6z"})})}},39625(e,t,s){s.d(t,{h:()=>o});var r=s(74848);const a=["color","size"];function o(e){let t=e.color,s=void 0===t?"red2":t,o=e.size,n=void 0===o?16:o,i=function(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;s[r]=e[r]}return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)s=o[r],-1===t.indexOf(s)&&{}.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}(e,a);return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 16 16",fill:`var(--${s})`,...i,children:(0,r.jsx)("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.