Hello,
You are using another plugin to add http2 headers but they probably add them using PHP. Enhanced doesn’t touch any PHP, so, therefore, they’re not added to the response the second time the page is requested. They’re not in the .htaccess file because the other plugin doesn’t modify that file.
You should use our http2 push settings instead.
But all the resources that are to be pushed (by this plugin) are getting added in the .htaccess file generated by w3 total cache in the cache/page_enhanced folder
This is a .htaccess file that is present for the home page in the page_enhanced folder,
you can see all this font file and other CSS files this was added to header by that plugin and w3 added them in .htaccess when generating cache.
But due to some reason, this is not getting used when files are served
<IfModule mod_headers.c>
Header unset Link
Header add Link '</wp-content/themes/truce/style.css>; rel=preload; as=style'
Header add Link '</wp-content/themes/Divi/style.css>; rel=preload; as=style'
Header add Link '</wp-includes/js/jquery/jquery.js>; rel=preload; as=script'
Header add Link '</wp-content/plugins/google-analytics-for-wordpress/assets/js/frontend.min.js>; rel=preload; as=script'
Header add Link '</wp-content/themes/truce/fonts/Lato-Bold.ttf>; rel=preload; as=font; crossorigin'
Header add Link '</wp-content/themes/truce/fonts/Lato-Regular.ttf>; rel=preload; as=font; crossorigin'
Header add Link '</wp-content/themes/truce/fonts/Lato-BoldItalic.ttf>; rel=preload; as=font; crossorigin'
Header add Link '</wp-content/themes/Divi/core/admin/fonts/modules.ttf>; rel=preload; as=font; crossorigin'
Header add Link '</wp-content/themes/truce/js/modernizr-webp.js>; rel=preload; as=script'
</IfModule>
Hello,
It’s explained in the previous why the headers are not added to the response the second time the page is requested.
And once again, You should use our http2 push settings instead.
Sorry if I am not getting you,
But the htaccess file is created by the w3 total cache and it adds all the resources that are pushed by the plugin in it properly, But in spite of being in the .htaccess of the cache those are not added in the header
is it because I am using disk enhanced, but even in Disk enhanced mode .htaccess file resources should be pushed
<IfModule mod_headers.c>
Header unset Link
Header add Link '</wp-content/themes/truce/style.css>; rel=preload; as=style'
Header add Link '</wp-content/themes/Divi/style.css>; rel=preload; as=style'
Header add Link '</wp-includes/js/jquery/jquery.js>; rel=preload; as=script'
Header add Link '</wp-content/plugins/google-analytics-for-wordpress/assets/js/frontend.min.js>; rel=preload; as=script'
Header add Link '</wp-content/themes/truce/fonts/Lato-Bold.ttf>; rel=preload; as=font; crossorigin'
Header add Link '</wp-content/themes/truce/fonts/Lato-Regular.ttf>; rel=preload; as=font; crossorigin'
Header add Link '</wp-content/themes/truce/fonts/Lato-BoldItalic.ttf>; rel=preload; as=font; crossorigin'
Header add Link '</wp-content/themes/Divi/core/admin/fonts/modules.ttf>; rel=preload; as=font; crossorigin'
Header add Link '</wp-content/themes/truce/js/modernizr-webp.js>; rel=preload; as=script'
</IfModule>