If it is an alliance marketing site, the speed of the site guiding traffic will affect the conversion, so it is very important. The
For my own free Ren plus many people, this plug-in can handle all necessary situations. However, if you need to render a particular post in advance, you need to create some custom PHP. For example, if the first page contains three links to the post (or page) you want to pre render, you can add a pre render tag to the title. To do this, you must use a function connected to wp_head. Internally, create an array with the ID of the post, and then repeat the annotation of the prerender tag. The prerender tag uses linked elements, such as style sheet links, but the rel attribute uses the \
Add\u action (‘wp\u head’, function(){
If (is_front_page()){
$posts = array (1,2,3);
Foreach ($posts as $post){
$url = get_permalink ($post);
Printf (”, esc\u URL ($url));
}The
}The
});
Of course, you can also dynamically select posts based on custom fields. In the following example running in the main article index, the article queries based on the \
Add\u action (‘wp\u head’, function(){
If (is_home()){
$args = array(
‘meta_key’= >’ Prefetch_on_home’,
‘meta_value’= > True
);
$query = new wp_query ($args);
If ($query-> have_posts()){
Foreach ($query-> posts as $post){
$url = get_permalink ($post-> ID);
Printf (”, esc\u URL ($url));
}The
}The
}The
});
I hope to learn how to improve site performance through schedule and optimization through this article. When appropriate, combined with static HTML caching, this simple technique can provide impressive load times with minimal bandwidth consumption.