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

Creates a timeout for preconnects #893

Merged
merged 1 commit into from
Nov 18, 2015

Conversation

cramforce
Copy link
Member

after which they will be done again if requests. This may happen when we preconnect super early but when do not actually render the element for a while.

Switches preconnecting to a callback that gets called 2x per element:

  1. At built time.
  2. Just after layoutCallback to parallelize requests.

Related #870 (Does not affect only calling preconnect when doc becomes visible)

@@ -34,7 +34,7 @@ describe('preconnect', () => {
});

afterEach(() => {
clock.tick(20000);
clock.tick(200000);
Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure you want 200,000 ms?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure. This just makes sure there is nothing left to do.

requests. This may happen when we preconnect super early but when do not
actually render the element for a while.

Switches preconnecting to a callback that gets called 2x per element:

1. At built time.
2. Just after layoutCallback to parallelize requests.

Related ampproject#870 (Does not affect only calling preconnect when doc becomes visible)
cramforce added a commit that referenced this pull request Nov 18, 2015
@cramforce cramforce merged commit a50ef91 into ampproject:master Nov 18, 2015
@cramforce cramforce deleted the preconnect-expiration branch November 18, 2015 15:50
@mborof mborof mentioned this pull request Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants