Issue _vercel/insights/script.js Still Being Served After Disabling

Hi Vercel Support Team,

I hope this message finds you well.

I am experiencing an issue with a script (/_vercel/insights/script.js) still being served on my site even after I have disabled Speed Insights in my project settings. Despite clearing the cache multiple times, the script continues to appear in the HTTP response headers. Below is an example of the response:

Code

$ curl -I https://arenatop100.com/_vercel/insights/script.js
HTTP/1.1 200 OK
Accept-Ranges: bytes
Access-Control-Allow-Origin: *
Age: 35705
Cache-Control: public, max-age=2678400
Content-Disposition: inline; filename="script.js"
Content-Length: 2354
Content-Type: application/javascript; charset=utf-8
Cross-Origin-Resource-Policy: cross-origin
Date: Thu, 09 Jan 2025 13:06:00 GMT
Etag: "fcf06e135949a699d8950fec18d1a14a"
Last-Modified: Wed, 08 Jan 2025 22:54:44 GMT
Server: Vercel
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
X-Vercel-Cache: HIT
X-Vercel-Id: fra1:fra1:fra1::b5g8x-1736427960420-baaed2a69863

The script is still being served. Could you please assist me in resolving this issue and ensuring that the script is no longer served on my site?

Thank you for your assistance.

Best regards,
[IliyaZafirov]

Hi @iliyazafirov! Did you redeploy or create a new deployment after disabling Speed Insights?

I tried, but nothing happend.

Thanks for confirming that.

Is Web Analytics enabled for the project? In that case, you would still see /_vercel/insights/* routes because the same path is used.

If not, could you also let us know if you have also removed the analytics package and inject function from your application? It’s possible that leftover scripts included in the project could be adding these extra routes.

I am using Vercel Analytics on my site.

I understand that this script is necessary for Analytics to function properly, but I would like to know:

What would happen if I add long-term caching for this file?
Would caching affect its functionality or analytics data accuracy in any way?
I’m also asking because PageSpeed Insights flags this script as needing an efficient cache policy, so I’m wondering what the best practice would be for optimizing caching without affecting Analytics.

Thank you for your assistance!