How should I minify my javascript, CSS, and HTML codes?
currently, I am using autoptimize for minification which doesn’t seem to be working according to the gt metrics, Lazy load by wp-rocket for lazy loading of images, the wp super cache for cache, and ithemes security.
I have used the mobile theme from the recent update of theme for the homepage and single post
website:https://hastysurf.com/
-
This topic was modified 5 years by
KSARANG. Reason: Update
Hi, please check this answer from this similar topic -> https://forum.tagdiv.com/topic/low-scores-on-mobile-amp-and-desktop/
Thank you!
I haven’t been able to resolve the speed low issues
https://gtmetrix.com/reports/hastysurf.com/wS8yovWM
these are the results please guide
On GT metrics it says minification of some tag inline, what exactly is it?
I have autoptimise in place or maybe I missed something in the settings.
by preloading fonts and optimize images? can you explain, please?
https://imgur.com/a/1k60Quj these are autoptimize settings related to inline and preloading which I activated after your response
I have a wp super cache with all recommended settings on
Lazy load in theme panel active
wp-optimise for database optimization ,site kit for google and ads are inserted in theme panel .
how to reduce HTTPS requests ? (SSL Active)
-
This reply was modified 5 years by
KSARANG. Reason: update
How can i optimize
wp-content/plugins/td-composer/assets/fonts/td-multipurpose/td-multipurpose.ttf
and
wp-content/themes/Newspaper/images/icons/newspaper.woff?19
and remove unused javascript and css from my page ?
Suggest plugins or ways to do so Site : hastysurf.com
Hi,
If you check the links above you see that in one topic @Amit provide a solution for how to preload the fonts, here is link to that topic -> https://forum.tagdiv.com/topic/score-100100-pagespeed-with-newspaper-wordpress-theme/page/4/
Also using thee Autoptimize you can improve your website and EWWW Image Optimizer it can be use for a better results on your images.
Hope this will help you!
I am still unable to understand , can you make it easier for me to place the code?
which code and where should I place it ? and I am not using wp-rocket.
These are the links I get on page speed under the preload key-requests :
1- https://hastysurf.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?19
2- https://hastysurf.com/wp-content/plugins/td-composer/assets/fonts/td-multipurpose/td-multipurpose.ttf
Also if I am supposed to add a code in function.php then do I have to simply add it in the end or in a specific space ???
please mention details in your solution please
Hi,
In order to reduce the time for icons you need add this code in head section:
// Preload Newspaper fonts for responsive theme (main theme) function dns_prefetch_responsive()
{
echo '<link rel="preload" href="https://hastysurf.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?19" as="font">';
echo '<link rel="preload" href="https://hastysurf.com/wp-content/plugins/td-composer/assets/fonts/td-multipurpose/td-multipurpose.ttf" as="font">';
}
add_action( 'wp_head', 'dns_prefetch_responsive', 0 );
This code can be set in a child theme in functions.php at the end of file -> https://i.imgur.com/KvX498h.png
In this way you do not need to do those steps after each theme update.
Hope this will help you!
Thank you!
You gave me the code and I pasted it in the child theme functions.php file as you can see in the image attached.
can I insert it in the main theme functions.php, If yes then where should I add, and if I am supposed to add a code in function.php then do I have to simply add it in the end or in a specific space ???
like I asked in image-2 in given link
