[wp-trac] [WordPress Trac] #50606: Preload WordPress Rest index endpoint when loading core Gutenberg

WordPress Trac noreply at wordpress.org
Tue Jul 7 20:34:55 UTC 2020

#50606: Preload WordPress Rest index endpoint when loading core Gutenberg
 Reporter:  jeremyyip    |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:  performance  |

 Data from WordPress REST endpoints can be preloaded before rendering the
 block editor. This allows us to ask the server to inject a response on the
 initial page load. It makes sense if the request will always be triggered
 on that page. The alternative is waiting for the page to load, waiting for
 scripts to execute, and then waiting for a response to the network request
 (which could have been preloaded).

 Core already preloads the WordPress Rest index endpoint, but it does not
 account for variations request urls (like inclusion of query params).

 Preload the `/?context=edit` index endpoint in core

 **Implementation Specifics:**
 Add `/?context=edit` to the list of paths to preload when loading core

Ticket URL: <https://core.trac.wordpress.org/ticket/50606>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list