Automattic / Automattic/jetpack

Defer Instant Search styles unless we're opening the modal immediately

Open
#20,352 0 comments 0 reactions 0 assignees View on GitHub
[Feature] Search Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

We received some user feedback that Google Pagespeed Insights flags the Instant Search stylesheet as a performance concern (pcNPJE-cq-p2).

One option might be to defer the loading of Instant Search styles unless the query string contains a search query (`?s=`):

https://web.dev/defer-non-critical-css/

![image-from-ios-4](https://user-images.githubusercontent.com/17325/125551519-6696d8b7-78f5-4dff-b47f-8ed47182dd47.png)

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by locating the Instant Search stylesheet and the code that checks the search query string; confirm the stylesheet is deferred when no ?s= query is present and available when the modal opens immediately.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
frontend, performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.