madoma73 wrote: ↑Wed Feb 09, 2022 1:24 pm
I'm trying to optimize at maximum page load on Wordpress,
it appears the iframe js is viewed as hardcoded whereas it seems to have others ways, could you please consider using standard hooks like described below:
the recommended
wp_enqueue_scripts() action hook (despite the name, it is used for enqueuing both scripts and styles) which is the proper one to use when enqueuing scripts and styles that are meant to appear on the front end. The standard functions that are used inside the hook to do an enqueuing are: wp_enqueue_style(), wp_add_inline_style(), wp_enqueue_script() & wp_add_inline_script().
Regards
Pierre
So Pierre, about this: i have take a look focusing into your hints.
But i do not see a possible better way to enqueue things.
Page forum just enqueue on page header some css and js using
add_action('wp_head','wp_w3all_add_ajax'); which is very simple and you can see what it add. Substantially nothing heavy, just little css and little js to response PMs and resize.
The problem with an iframe, is that the page do not only load (the first time) wordpress, but also the entire phpBB into an iframe.
But i will follow to see around this and let you know.
In the while, i see that in the past i placed an
iframe shortcode. Very incomplete.
It is time to setup this shortcode that will answer to the templates problem.
The effect will be the same exact of the page-forum, but using a shortcode, the iframe will appear everywhere we like.
Also into a widget.
This will be awesome if it can be done as i think.
Easy and effective.
I will give you to test out, not sure if this feature will be free.