PageSourceSearch

https://indianexpress.com/wp-content/themes/indianexpress/js/page-…/page-vitals-tracker.min.js?ver=15092026.01

js indianexpress.com collected 2026-09-24 06:04:07 UTC 13,720 bytes, 1 lines download raw bytes

1!function(){"use strict";const e=window.VitalsTrackerConfig||{},t=Array.isArray(e.firstPartyDomain)?e.firstPartyDomain:["indianexpress.com"],n=e.apiDomain?`https://${e.apiDomain}/api/reports/performance/log`:"https://devua.indianexpress.com/api/reports/performance/log",r="0355c2d801f6d0fee2f1977f14cc673d25d7335d2324f7e8a5db3bdfce04d0f5",o=524288e3,i=26214400,a=102400;try{performance.setResourceTimingBufferSize&&performance.setResourceTimingBufferSize(5e3)}catch(e){}let s=y("oauth_ssoid")??"",c=y("ev_user_state")??"",u=y("fpuuid")??"",l=y("pluuid")??"",d="",m=!1,p=[];function g(e){return"number"!=typeof e?0:Number.isFinite(e)?Number.isNaN(e)||e<0||e>o?0:Math.round(e):0}function f(e){return e.transferSize>0&&e.transferSize<i?e.transferSize:(200===e.responseStatus||206===e.responseStatus)&&e.encodedBodySize>0&&e.encodedBodySize<i?e.encodedBodySize:e.decodedBodySize>0&&e.decodedBodySize<i?e.decodedBodySize:0}function y(e){const t=document.cookie.split(";");for(let n=0;n<t.length;n++){let r=t[n].substr(0,t[n].indexOf("=")),o=t[n].substr(t[n].indexOf("=")+1);if(r=r.replace(/^\s+|\s+$/g,""),r===e)return decodeURIComponent(o)}return null}!async function(){if("PerformanceObserver"in window&&PerformanceObserver.supportedEntryTypes?.includes("longtask"))try{new PerformanceObserver((e=>{e.getEntries().forEach((e=>{const t=Math.round(e.startTime),n=Math.round(e.duration);if(n<100)return;const r=e.attribution?.[0]||{};p.push({startTime:t,duration:n,endTime:t+n,containerType:r.containerType||"",containerId:r.containerId||"",containerName:r.containerName||""}),p.length>20&&p.shift()}))})).observe({type:"longtask",buffered:!0})}catch(e){}const o=function(){const t=window.location.href,n=Number(e.channel),r=Number(e.source)||1,o=e.pageType||"home";let i=document.referrer||"";if(/t\.co|twitter\.com|x\.com/i.test(i)?i="x-app":/facebook\.com|fb\.com/i.test(i)?i="facebook-app":/instagram\.com/i.test(i)&&(i="instagram-app"),!i){const e=new URLSearchParams(location.search),t=e.get("utm_source")||"",n=e.get("utm_medium")||"",r=e.get("fbclid"),o=e.get("twclid");i=r?"facebook-app":o?"x-app":/whatsapp/i.test(t)?"whatsapp":/instagram/i.test(t)?"instagram":/facebook|fb/i.test(t)?"facebook":/twitter|x\.com/i.test(t)?"x":/threads/i.test(t)?"threads":/social/i.test(n)?"social":"direct"}return{channel:n,source:r,pageType:o,pageUrl:t,pageReferrer:i}}(),i=function(){const e=navigator.userAgent,t=/Edg\//i.test(e)?"edge":/OPR\//i.test(e)?"opera":/Chrome\//i.test(e)?"chrome":/Firefox\//i.test(e)?"firefox":/Safari\//i.test(e)?"safari":"unknown",n=/iPhone|iPad|iPod/i.test(e)?"ios":/Android/i.test(e)?"android":/Windows NT/i.test(e)?"windows":/Mac OS X/i.test(e)?"macos":/Linux/i.test(e)?"linux":"unknown",r=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return{browser:t,os:n,networkType:r?r.effectiveType?r.effectiveType:r.type?r.type:"unknown":"unknown",userAgent:e,deviceMemory:navigator.deviceMemory||0,hardwareConcurrency:navigator.hardwareConcurrency||0,rtt:r?.rtt||0,downlink:r?.downlink||0}}(),y=await async function(){try{let e=sessionStorage.getItem("ua_geoip_location");if(e)return e=JSON.parse(e),{ip:e.ip||"n/a",city:e.city||"n/a",state:e.state||"n/a",country:e.country||"n/a"}}catch(e){}return{ip:"n/a",city:"n/a",state:"n/a",country:"n/a"}}(),h=function(){const e={fcpMs:null,ttfbMs:null,lcpMs:null,lcpSelector:"",lcpResourceLoadDelay:0,lcpResourceLoadDuration:0,lcpElementRenderDelay:0,visualCompleteMs:null,cls:0,inpMs:null,inpInputDelay:0,inpProcessingTime:0,inpPresentationDelay:0,inpSelector:"",longTaskDuration:0,longTaskStartTime:0,longTaskGapBeforeInteraction:0,longTaskContainerType:"",longTaskContainerId:"",longTaskContainerName:""};if(window.webVitals&&"function"==typeof window.webVitals.onFCP&&"function"==typeof window.webVitals.onLCP&&"function"==typeof window.webVitals.onINP&&"function"==typeof window.webVitals.onCLS&&"function"==typeof window.webVitals.onTTFB){const{onFCP:t,onTTFB:n,onLCP:r,onCLS:o,onINP:i}=window.webVitals;n((t=>{e.ttfbMs=Math.round(t.value)})),t((t=>{e.fcpMs=Math.round(t.value)})),r((t=>{e.lcpMs=Math.round(t.value);const n=t.entries?.[0],r=n?.url?performance.getEntriesByType("resource").find((e=>e.name===n.url)):null;
1if(r&&(e.lcpResourceLoadDelay=Math.max(0,Math.round(r.requestStart)),e.lcpResourceLoadDuration=Math.max(0,Math.round(r.responseEnd-r.requestStart)),e.lcpElementRenderDelay=Math.max(0,Math.round(n.startTime-r.responseEnd))),!n)return;const o=n.element;if(!o)return;const i=o.parentElement,a=e=>{if(!e)return"";let t=e.tagName.toLowerCase();return"string"==typeof e.className&&e.className.trim()&&(t+="."+e.className.trim().split(/\s+/).join(".")),t},s=a(o),c=a(i);e.lcpSelector=c?`${c} > ${s}`:s})),o((t=>{e.cls=Number(t.value.toFixed(4))})),i((t=>{e.inpMs=Math.round(t.value);const n=t.entries||[];if(!n.length)return;const r=n.reduce(((e,t)=>e?t.processingEnd>e.processingEnd?t:e:t),null);if(!r)return;const o=Math.max(0,r.processingStart-r.startTime),i=Math.max(0,r.processingEnd-r.processingStart),a=Math.max(0,r.startTime+r.duration-r.processingEnd);e.inpInputDelay=Math.round(o),e.inpProcessingTime=Math.round(i),e.inpPresentationDelay=Math.round(a);const s=Math.round(r.startTime),c=[...p].reverse().find((e=>e.endTime<=s&&s-e.endTime<=1e3));e.longTaskDuration=c?.duration||0,e.longTaskStartTime=c?.startTime||0,e.longTaskGapBeforeInteraction=c?Math.max(0,s-c.endTime):0,e.longTaskContainerType=c?.containerType||"",e.longTaskContainerId=c?.containerId||"",e.longTaskContainerName=c?.containerName||"";const u=r.target,l=u?.parentElement,d=e=>{if(!e)return"";let t=e.tagName.toLowerCase();return"string"==typeof e.className&&e.className.trim()&&(t+="."+e.className.trim().split(/\s+/).join(".")),t},m=d(u),g=d(l);e.inpSelector=g?`${g} > ${m}`:m}),{reportAllChanges:!0})}return e}();!function(e){if("undefined"==typeof window||void 0===window.performance)return;const t=Array.from(document.images).filter((e=>{const t=e.getBoundingClientRect();return t.bottom>0&&t.top<window.innerHeight&&t.right>0&&t.left<window.innerWidth})).map((e=>e.complete?Promise.resolve():new Promise((t=>{let n=!1;const r=()=>{n||(n=!0,e.removeEventListener("load",r),e.removeEventListener("error",r),t())};e.addEventListener("load",r,{once:!0}),e.addEventListener("error",r,{once:!0}),setTimeout(r,2e3)})))),n=document.fonts&&document.fonts.ready?document.fonts.ready:Promise.resolve();Promise.all([...t,n]).then((()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{e.visualCompleteMs=Math.round(performance.now())}))}))}))}(h);let T={navEntry:performance.getEntriesByType("navigation")[0],pltMs:null};const S=()=>{if(m)return;const e=T?.navEntry||performance.getEntriesByType("navigation")[0],p=function(e){const n={resourceCount:0,html:0,css:0,cssFirstParty:0,js:0,jsFirstParty:0,jsThirdParty:0,image:0,imageFirstParty:0,font:0,fontFirstParty:0,other:0,otherFirstParty:0,firstPartyTotal:0,total:0},r=performance.getEntriesByType("resource");n.resourceCount=r.length,r.forEach((e=>{const r=e.name.toLowerCase();if(r.startsWith("data:")||r.startsWith("blob:"))return;const o=f(e);if(!o)return;const i=e.initiatorType;let a="";try{a=new URL(e.name).hostname}catch(e){}const s=t.some((e=>a===e||a.endsWith(`.${e}`))),c="font"===i||/\.(woff2?|woff|ttf|otf|eot|ttc|otc)(\?|$)/i.test(r),u=!c&&("css"===i||"link"===i&&/\.css(\?|$)/i.test(r)),l="script"===i,d="img"===i||"image"===i||/\.(png|jpe?g|gif|bmp|webp|avif|svg|ico|apng)(\?|$)/i.test(r);c?(n.font+=o,s&&(n.fontFirstParty+=o)):u?(n.css+=o,s&&(n.cssFirstParty+=o)):l?(n.js+=o,s?n.jsFirstParty+=o:n.jsThirdParty+=o):d?(n.image+=o,s&&(n.imageFirstParty+=o)):(n.other+=o,s&&(n.otherFirstParty+=o))})),e&&(n.html=g(f(e)));const o=e=>{const t=Math.round(g(e)/1024);return t>0&&t<a?t:0};n.html=o(n.html),n.css=o(n.css),n.cssFirstParty=o(n.cssFirstParty),n.js=o(n.js),n.jsFirstParty=o(n.jsFirstParty),n.jsThirdParty=o(n.jsThirdParty),n.image=o(n.image),n.imageFirstParty=o(n.imageFirstParty),n.font=o(n.font),n.fontFirstParty=o(n.fontFirstParty),n.other=o(n.other),n.otherFirstParty=o(n.otherFirstParty);const i=n.html+n.css+n.js+n.image+n.font+n.other;return n.total=i>0&&i<a?i:0,n.firstPartyTotal=n.html+n.cssFirstParty+n.jsFirstParty+n.imageFirstParty+n.fontFirstParty+n.otherFirstParty,n}(e),S=function(){const e=["script","css","img","image","link","font"],n=["/pagead/1p-user-list/","doubleclick.net/
1pagead","googleads.g.doubleclick.net/pagead"],r=new Set;return performance.getEntriesByType("resource").filter((t=>{if(t.duration<=0)return!1;if(!e.includes(t.initiatorType))return!1;if(n.some((e=>t.name.includes(e))))return!1;if(f(t)<=0)return!1;const o=t.name+"|"+t.initiatorType;return!r.has(o)&&(r.add(o),!0)})).sort(((e,t)=>t.duration-e.duration)).slice(0,10).map((e=>{let n="";try{n=new URL(e.name).hostname}catch(e){}const r=!t.some((e=>n===e||n.endsWith(`.${e}`)));return{resourceName:e.name,resourceType:e.initiatorType||"other",resourceDomain:n,resourceSizeKB:Math.round(f(e)/1024),resourceStartTimeMS:Math.round(e.startTime),resourceEndTimeMS:Math.round(e.responseEnd),resourceDurationMS:Math.round(e.duration),resourceDownloadTimeMS:Math.max(0,Math.round(e.responseEnd-e.responseStart)),resourceWaitTimeMS:Math.max(0,Math.round(e.responseStart-e.startTime)),isThirdParty:r}}))}(),M=function(e){const n=[...document.querySelectorAll('link[rel="stylesheet"]')],r=[...document.querySelectorAll("script[src]:not([async]):not([defer])")];return performance.getEntriesByType("resource").filter((t=>{if(n.find((e=>
1e.href===t.name))&&t.startTime<=(e.fcpMs||1/0))return!0;const o=r.find((e=>e.src===t.name));return o&&!o.async&&!o.defer&&t.startTime<=(e.fcpMs||1/0)})).map((r=>{const o=n.find((e=>e.href===r.name));let i="";try{i=new URL(r.name).hostname}catch(e){}const a=!t.some((e=>i===e||i.endsWith(`.${e}`)));return{resourceName:r.name,resourceType:r.initiatorType||"other",renderBlockingReason:o?"stylesheet":"sync-script",resourceDomain:i,resourceSizeKB:Math.round(f(r)/1024),resourceDurationMS:Math.round(r.duration),resourceDownloadTimeMS:Math.max(0,Math.round(r.responseEnd-r.responseStart)),resourceWaitTimeMS:Math.max(0,Math.round(r.responseStart-r.startTime)),renderBlockingTimeMS:Math.max(0,Math.round(Math.min(r.responseEnd,e.fcpMs||1/0)-r.startTime)),resourceStartTimeMS:Math.round(r.startTime),resourceEndTimeMS:Math.round(r.responseEnd),isThirdParty:a}})).filter((e=>e.renderBlockingTimeMS>0)).sort(((e,t)=>t.renderBlockingTimeMS-e.renderBlockingTimeMS)).slice(0,20)}(h),w=M.length,P=M.length?Math.max(...M.map((e=>e.renderBlockingTimeMS))):0,k=M.filter((e=>e.renderBlockingTimeMS>=100)),v=Number(T?.pltMs??0);if(Number.isFinite(v)&&v>12e4)return;const b=e?.domContentLoadedEventEnd>0?Math.round(e.domContentLoadedEventEnd-e.startTime):0,E=function({context:e,client:t,pltMs:n,dclMs:r,vitals:o,weight:i,geo:a,slowestResources:m,renderBlockingResourceCount:p,maxRenderBlockingTimeMS:g}){return u&&(d=u),l&&(d=l),c="registered"===c?"2":"subscriber"===c?"7":"1",{trackingName:"PLT",trackingType:"",channel:e.channel,source:e.source,userType:c,ssoId:s,uuid:d,pageType:e.pageType,pageUrl:e.pageUrl,pageReferrer:e.pageReferrer,networkType:t.networkType,browser:t.browser,os:t.os,userAgent:t.userAgent,performanceParams:{ttfbMs:String(o.ttfbMs??0),fcpMs:String(o.fcpMs??0),lcpSelector:String(o.lcpSelector||""),lcpMs:String(o.lcpMs??0),lcpResourceLoadDelay:String(o.lcpResourceLoadDelay||0),lcpResourceLoadDuration:String(o.lcpResourceLoadDuration||0),lcpElementRenderDelay:String(o.lcpElementRenderDelay||0),visualCompleteMs:String(o.visualCompleteMs??0),inpSelector:String(o.inpSelector??""),inpMs:String(o.inpMs??0),inpInputDelay:String(o.inpInputDelay??0),inpProcessingTime:String(o.inpProcessingTime??0),inpPresentationDelay:String(o.inpPresentationDelay??0),longTaskDuration:String(o.longTaskDuration??0),longTaskGapBeforeInteraction:String(o.longTaskGapBeforeInteraction??0),longTaskStartTime:String(o.longTaskStartTime??0),longTaskContainerType:String(o.longTaskContainerType||""),longTaskContainerId:String(o.longTaskContainerId||""),longTaskContainerName:String(o.longTaskContainerName||""),cls:String(o.cls??0),dclMs:String(r??0),pltMs:String(n),resourceCount:String(i.resourceCount),firstPartyTotal:String(i.firstPartyTotal),total:String(i.total),html:String(i.html),css:String(i.css),js:String(i.js),jsFirstParty:String(i.jsFirstParty),jsThirdParty:String(i.jsThirdParty),image:String(i.image),font:String(i.font),other:String(i.other),deviceMemory:t.deviceMemory,hardwareConcurrency:t.hardwareConcurrency,rtt:t.rtt,downlink:t.downlink,slowestResources:m,renderBlockingResourceCount:p,maxRenderBlockingTimeMS:g},userGeo:{ip:a.ip,city:a.city,state:a.state,country:a.country}}}({context:o,client:i,pltMs:v,dclMs:b,vitals:h,weight:p,geo:y,slowestResources:S,renderBlockingResourceCount:w,maxRenderBlockingTimeMS:P});P>=100&&(E.performanceParams.renderBlockingResources=k),function(e){m||(m=!0,fetch(n,{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json","API-KEY":r},body:JSON.stringify(e)}).catch((()=>{})))}(E)},M=()=>{S()};document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&M()}),{capture:!0,once:!0}),window.addEventListener("pagehide",M,{capture:!0,once:!0}),(async()=>{"complete"!==document.readyState&&await new Promise((e=>{window.addEventListener("load",e,{once:!0})})),T=await new Promise((e=>{const t=e=>{const t=[e.loadEventEnd,e.domContentLoadedEventEnd,e.domInteractive];for(const n of t)if(n>0){const t=Math.round(n-e.startTime);if(Number.isFinite(t)&&t>=50)return t}return null},n=r=>{const o=performance.getEntriesByType("navigation")[0];o&&o.loadEventEnd>
10?e({navEntry:o,pltMs:t(o)}):r>=20?e({navEntry:o,pltMs:o?t(o):null}):setTimeout((()=>n(r+1)),100)};n(0)}))})()}()}();

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.