logomaking digital easy
  • Home
  • People
    • Neuralab team
    • Join the team
    • Internship program
    • In the media
  • Clients
    • Clients overview
    • Download references (PDF)
    • Client references
    • Client testimonials
  • Portfolio
    • Production portfolio
    • Download portfolio (PDF)
    • Follow us on Behance
  • Products & Services
    • Products & Services overview
    • Download catalog (PDF)
    • Awarded products
  • Contact
    • Info & Locations
    • Join the team
    • Internship program
    • For press and media
  • Blog & News

WordPress page load prediction (browser prefetch) plugin

By KresimirKoncic on 28/07/2019 Filed Under: Development, News, Web development

Machine learning techniques are miles out of scope when producing WordPress projects. We wanted to change that as we believe that the tools are just around the corner, waiting to be picked up for some proper dataset whooping.

Google analytics suite is one of those datasets that are loaded with web data, ready to be harvested, crunched and in the end, benefit end-users to some extent. Our idea is this: Let’s use Google analytics data and predict which page users want to see next. And to make it more interesting to Mr. Asimov… let’s prefetch this predicted page into users browser so that the page loads blazingly fast. Enter… Neuralab’s Next WP Page preloader

In essence, we created a WordPress plugin which utilizes Google Analytics, visitor’s browser cache, and simple machine learning math to make user’s experience faster. Here are the simple steps to configure it on your website (you can download this plugin on our Github page: https://github.com/Neuralab/WP-next-web-page-cache )

To cache or not to cache

Initial step of this plugin is to obtain all the existing relationships (next visited from the current page) between web pages from the Google Analytics using WP CRON. For a setup details, please visit plugin’s settings page:

https://{your_website_url}/wp-admin/options-general.php?page=nwpp

During that step, stochastic vectors and global popularity are calculated for each page. These data is utilized in predicting which pages have the most chances to be visited by the user from a current web page.

After initial step, first CRON function is deactivated and another activated which does the same but once per day and only updating local stats with the results from the past day. Also, predicting is activated – each time a user visits a web page, plugin will try to predict which pages will be next and fetch those web pages. 

Note: Images from those prefetched pages will also be cached IF Cache API is available and the web app is running on HTTPS (which you should definitely enable).

We have a couple of future ideas for this automaton:

  • lower cache limits for mobile networks
  • cache all types of assets
  • smarter cache clearing

You can write us about your thoughts via Github issues or you can visit us on 3rd WordPress meetup and talk to our dev team in person. The event starts on 31st of July (Zagreb) and here are all the details about it. This is a first version of this plugin and we would like to get your feedback on it.

  • This field is for validation purposes and should be left unchanged.

We're hosting a 3rd WordPress meetup in Zagreb
Lens Curator s04e08