Scheduling CSS Monitoring & Change Detection
Keeping your website's CSS optimized is crucial for fast loading times and a great user experience. With PerfBee's Critical CSS feature, you can extract and monitor your above-the-fold CSS on a schedule. This article guides you through setting up scheduled CSS monitoring with change detection alerts.
Why Schedule Recurring CSS Extraction?
Regularly extracting and monitoring your Critical CSS helps you:
- Maintain optimal performance: Make sure the critical CSS you inlined still matches your pages.
- Detect unintended changes: Identify CSS modifications that could negatively impact your site's performance, especially after deployments.
- Stay ahead of the curve: Quickly spot and address any performance regressions.
Change Detection: PerfBee Alerts You
Each scheduled run extracts the page's critical CSS again and compares it with the previous run. When the CSS changed and its size moved by at least your threshold, PerfBee alerts you. This helps you catch potential issues early.
Change Threshold Setting
The Change Threshold setting is the percentage change in the size of the combined critical CSS, compared with the previous run, that triggers an alert. The default value is 5%. You set it when you create or edit a schedule in the PerfBee dashboard.
Notify on Change
When the critical CSS changes beyond the Change Threshold, PerfBee shows an in-app notification and sends an email to the Notification Email address, or to your account email if you leave it empty. Alert emails need the Starter plan or higher; on the Free plan you get the in-app notification only. You can switch this email off in your notification settings. This is useful for detecting unintended CSS changes after deployments or other updates.
Schedule Frequency
You can schedule CSS monitoring to run at the following frequencies:
- Daily: Runs every day at a specified time.
- Weekly: Runs on a specific day of the week.
- Monthly: Runs on a specific day of the month.
How to Set Up a CSS Monitoring Schedule
- Log in to your PerfBee account: https://dashboard.perfbee.com.
- Open Critical CSS in the sidebar.
- On the New Extraction tab, enter the URL you want to monitor in the URL List field. A schedule monitors one URL; if you enter several, it uses the first one.
- Click the Schedule button next to Extract Critical CSS.
- Enter a Schedule Name.
- Choose your desired schedule frequency (Daily, Weekly, or Monthly).
- Set the Run Time, and the Run Day for weekly and monthly schedules.
- Set the Change Threshold (default 5%) and, if you want, a Notification Email.
- Click Save Schedule. Each run costs 1 credit, charged only when the extraction succeeds.
Scheduled runs use a 375x667 mobile viewport and a 1920x1080 desktop viewport, and each run is saved in the History tab.
Viewing Scheduled Checks & Toggling Active/Inactive
In the Critical CSS > Scheduled tab, you can see all your scheduled CSS monitoring tasks, with the number of active schedules and detected changes. You can:
- View schedule details: See the URL, frequency, next run, last run time, and how many runs and changes the schedule has had.
- Toggle Active/Inactive: Use the Pause or Activate button to pause or resume a schedule without deleting it. The same row has Edit and Delete buttons.
Run a Schedule Immediately
To run a schedule immediately without waiting for the scheduled time, click the Run Now button next to the schedule in the Critical CSS > Scheduled tab.