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

Preload the admin.js script for faster connection experiance. #14131

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

enejb
Copy link
Member

@enejb enejb commented Nov 26, 2019

This PR tries to improve the loading experience of the user that use the connect in place flow. By prefetching the admin.js files while the user is also in the process of connecting.

Since the admin.js file is pretty large prefetching is improved the load experiance quite a bit.
This improvement currently only work in the latest Chrome browser. It doesn't load the resource twice in Firefox. ( Safari doesn't support the new connect in place flow.

Testing instructions:

Use the constant define( 'JETPACK_SHOULD_USE_CONNECTION_IFRAME', true );
So that your site gets places in the new connect in place flow.
In Chrome:
Have the network panel open.
Notice that the admin.js file gets loaded before we navigate to the admin page.

In Firefox.
Notice that admin.js file doesn't get loaded twice.

Proposed changelog entry for your changes:

  • Add prefetch of the admin.js file to the connection flow.

@enejb enejb requested a review from a team as a code owner November 26, 2019 14:42
@enejb enejb self-assigned this Nov 26, 2019
@enejb enejb added Connect Flow Connection banners, buttons, ... [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it labels Nov 26, 2019
@jetpackbot
Copy link

Warnings
⚠️

The PR is missing at least one [Status] label. Suggestions: [Status] In Progress, [Status] Needs Review

This is an automated check which relies on PULL_REQUEST_TEMPLATE. We encourage you to follow that template as it helps Jetpack maintainers do their job. If you think 'Testing instructions' or 'Proposed changelog entry' are not needed for your PR - please explain why you think so. Thanks for cooperation 🤖

Generated by 🚫 dangerJS against 0b22feb

@jeherve jeherve added this to the 8.1 milestone Nov 27, 2019
@jeherve jeherve added [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Focus] Performance labels Nov 27, 2019
Copy link
Contributor

@ChaosExAnima ChaosExAnima left a comment

Choose a reason for hiding this comment

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

Can confirm this works on Chrome! 👍

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Dec 12, 2019
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This seems to work for me! 🚢

@enejb enejb merged commit 16d6abd into master Dec 16, 2019
@enejb enejb deleted the add/prefetch-js-connect-in-place branch December 16, 2019 09:43
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Dec 16, 2019
jeherve added a commit that referenced this pull request Dec 20, 2019
zinigor added a commit that referenced this pull request Dec 30, 2019
* Changelog: 8.1 additions

* Changelog: add #13858

* Changelog: add #13963

* Changelog: add #14174

* Changelog: add #14178

* Changelog: add #14175

* Changelog: add #14192

* Changelog: add #14196

* Changelog: add #14182

* Changelog: add #14218

* Changelog: add #14214

* Changelog: add #13757

* Changelog: add #14190

* Changelog: add #14131

* Changelog: add #14101

* Changelog: add #14203

* Changelog: add #14211

* Changelog: add #14224

* Changelog: add #14230

* Changelog: add #14241

* Changelog: add #14249

* Changelog: add #14264

* Changelog: add #14263

* Changelog: add #14256

* Changelog: add #10189

* Changelog: add #14240

* Changelog: add #14239

Also added some new entries to the testing file.

Co-authored-by: Igor Zinovyev <zinigor@gmail.com>
zinigor added a commit that referenced this pull request Dec 30, 2019
* Changelog: 8.1 additions

* Changelog: add #13858

* Changelog: add #13963

* Changelog: add #14174

* Changelog: add #14178

* Changelog: add #14175

* Changelog: add #14192

* Changelog: add #14196

* Changelog: add #14182

* Changelog: add #14218

* Changelog: add #14214

* Changelog: add #13757

* Changelog: add #14190

* Changelog: add #14131

* Changelog: add #14101

* Changelog: add #14203

* Changelog: add #14211

* Changelog: add #14224

* Changelog: add #14230

* Changelog: add #14241

* Changelog: add #14249

* Changelog: add #14264

* Changelog: add #14263

* Changelog: add #14256

* Changelog: add #10189

* Changelog: add #14240

* Changelog: add #14239

Also added some new entries to the testing file.

Co-authored-by: Igor Zinovyev <zinigor@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Connect Flow Connection banners, buttons, ... [Focus] Performance [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants