how to remove render-blocking JavaScript and CSS in fold content

Latest Reply from govind at 2014-02-15 06:02:21 Solution
i am using light cafe from 1 year
with my site
when i check my speed with
error message shows
render-blocking JavaScript and CSS in above-the-fold content
how to resolve this problem please guide me.
We don't recommend you to remove our java script. It is a very useful part of the theme. But you can disable your plugins and optimize your website.

i think this both scripts are for contact us page only. i am not using maps on every page. have any idea to remove this scripts except contact us page ?
still waiting for response i am using two paid templates.
The first link is very useful for your contact form and for the proper work of google map shortcode. If you don't use the maps at all you can remove the code :
   wp_register_script( 'googlemaps', '', array( 'jquery' ), '3' );
wp_enqueue_script( 'googlemaps' );
from the file inc/library.php.
Probably, the other link is provided by your third party plugin. You can get rid of it, but I don't know what the file calls this script. If the page is not your contact page it doesn't contain the script.
i have solved my case
i have added this code to function.php
add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );
function my_deregister_javascript() {
wp_deregister_script( 'googlemaps' );


and this lines to top.php
<?php if(is_page('62')): ?>
<script src=""></script>
<?php endif; ?>

'62' is my page id were i want to show google map.

Leave a reply

Add codeAdd image