Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes outdated pieces of Speculation Rules logic that are no longer needed as of Chrome 121 #940

Merged

Conversation

felixarntz
Copy link
Member

Summary

Fixes #909

Relevant technical choices

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

@felixarntz felixarntz added [Type] Enhancement A suggestion for improvement of an existing feature [Focus] JS & CSS no milestone PRs that do not have a defined milestone for release [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) labels Jan 16, 2024
* * https://github.com/whatwg/urlpattern/issues/179
* * https://chromium-review.googlesource.com/c/chromium/src/+/4975595
*/
return $exclude_path . '\\?*#*';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domenic Can you confirm these wildcard suffixes are no longer useful as of Chrome 121?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed!

@@ -67,7 +57,7 @@ static function ( $exclude_path ) use ( $prefixer ) {
'and' => array(
// Prerender any URLs within the same site.
array(
'href_matches' => $prefixer->prefix_path_pattern( '/*\\?*' ),
'href_matches' => $prefixer->prefix_path_pattern( '/*' ),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domenic Same here, can you confirm this is safe to drop?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed!

Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

* * https://github.com/whatwg/urlpattern/issues/179
* * https://chromium-review.googlesource.com/c/chromium/src/+/4975595
*/
return $exclude_path . '\\?*#*';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed!

@@ -67,7 +57,7 @@ static function ( $exclude_path ) use ( $prefixer ) {
'and' => array(
// Prerender any URLs within the same site.
array(
'href_matches' => $prefixer->prefix_path_pattern( '/*\\?*' ),
'href_matches' => $prefixer->prefix_path_pattern( '/*' ),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed!

@felixarntz felixarntz merged commit 48c1728 into feature/speculationrules Jan 17, 2024
7 checks passed
@felixarntz felixarntz deleted the enhance/speculation-rules-chrome-121 branch January 17, 2024 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no milestone PRs that do not have a defined milestone for release [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants