If you're using Cloudflare to host your website or app, you might encounter warnings in Google PageSpeed Insights. Two common ones are "Browser errors were logged to the console - /cdn-cgi/rum" and "Serve static assets with an efficient cache policy - /beacon.min.js/". Let's address both.
1. Browser Errors Logged to Console

This warning usually indicates a problem with resources being loaded on your site, often a "404 Not Found" error for Cloudflare's Real User Monitoring (RUM) script, specifically referencing /cdn-cgi/rum:1.0
.
What's the Problem?
This error means your browser is requesting a file that the server cannot find. In the context of Cloudflare, it points to an issue with how RUM is trying to collect performance data.
Here's How to Fix It:
- Check Cloudflare Status:
Visit Cloudflare Status Page to see if there are any reported issues. If there's an outage, wait for Cloudflare to resolve it.
- Disable Cloudflare RUM:
- Log in to your Cloudflare Dashboard.
- Go to "Analytics & Logs" -> "Web Analytics".
- Find & Click on "Manage Site".
- Choose Disable "RUM - Real User Monitoring", then "Update".
- Retest your site in PageSpeed Insights.
- If the error disappears, it confirms the issue is with RUM. You can leave it off or re-enable it later.
- Contact Cloudflare Support:
If the problem persists, contact Cloudflare support with the error message and steps you've taken. They can investigate further.
2. Serve Static Assets with an Efficient Cache Policy

This warning means that static resources (like JavaScript files) aren't being cached efficiently by browsers, leading to slower load times on repeat visits.
What's the Problem?
In your case, PageSpeed Insights is flagging /beacon.min.js/lvcd15cbe...
(from static.cloudflareinsights.com
) as having a short cache lifetime (1 day). This is a Cloudflare-managed script.
How to Fix It:
Since this is a Cloudflare-managed resource, you have limited control. However, you can ensure your overall caching settings are optimized.
- Check Cloudflare Caching Settings:
- Log in to your Cloudflare Dashboard.
- Select your domain.
- Go to "Caching" -> "Configuration".
- Ensure "Browser Cache TTL" is set to a reasonable value (e.g., a month or longer) for static assets.
- Use Cloudflare Page Rules:
You can create Page Rules to set specific cache settings for certain file types or paths. While you won't be able to directly change the cache for
static.cloudflareinsights.com
, you can improve caching for other static assets on your site. - Ignore (with Caution):
In this specific case, since it's a Cloudflare-managed script, you might choose to ignore the warning. However, ensure that you're optimizing caching for other static assets on your site.
3. Important Notes:
- Disabling RUM will stop Cloudflare from collecting real-time performance data.
- Monitor your site after making changes to ensure errors don't return.
- Optimizing caching for static assets improves site performance for returning visitors.
By following these steps, you should be able to resolve both the "Browser errors were logged to the console" and "Serve static assets with an efficient cache policy" warnings, improving your website's performance score.