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

feat(docs): update docs on Guess.js #8899

Merged
merged 14 commits into from
Jan 24, 2019
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/docs/optimizing-plugins-with-guessjs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Optimizing plugins with Guess.js
---

Pre-loading resources is a great way to improve application performance. However, pre-loading everything on a page can waste bandwidth. This is especially true for mobile phone users who may have limited data and bandwidth. So how do you know which resources to pre-load? Is it just a guessing game? Not anymore.

## Introducing Guess.js

By leveraging Google Analytics data and machine learning, [Guess.js](https://github.com/guess-js/guess) is able determine which pages a user is most likely to navigate to from the current page and only pre-load those resources. Thus, there are fewer network requests which improves performance on slower networks.

## How does it work?

Guess.js will download a file from Google Analytics during the production build. This file is then used to construct the model for predictive analytics.

## Guess.js and Gatsby

See the [Gatsby Guess.js Plugin](https://www.gatsbyjs.org/packages/gatsby-plugin-guess-js) for more information on integrating Guess.js with Gatsby.

### References:

- [Introducing Guess.js](https://blog.mgechev.com/2018/05/09/introducing-guess-js-data-driven-user-experiences-web/)
- [Gatsby Plugin Guess.js](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-guess-js)
- [Cutting Edge Static Sites](https://www.contentful.com/blog/2018/06/13/journey-cutting-edge-static-sites-gatsbyjs-v2/)
2 changes: 2 additions & 0 deletions www/src/data/sidebars/doc-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@
link: /docs/seo/
- title: Optimize Prefetching with Guess.js*
link: /docs/optimize-prefetching-with-guessjs/
- title: Optimizing Plugins with Guess.js*
link: /docs/optimizing-plugins-with-guessjs/
- title: Ecosystem
link: /ecosystem/
items:
Expand Down