Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support KokkieH

    (@kokkieh)

    Hi there,

    It looks like you’ve already posted in https://www.ads-software.com/support/topic/404-pages-found-at-gtmetrix/ as well where one of our developers are helping with this, so please be patient waiting for a reply from them there.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I’ve replied on the other thread; you can indeed use the code snippet I mentioned on the other thread to solve the issue:

    /**
     * Fix the path of Woo script.
     *
     * @param string $url The URL to the file.
     * @param string $min_path The minified path.
     * @param string $non_min_path The non-minified path.
     */
    function jetpackcom_fix_woo_script_path( $url, $min_path, $non_min_path ) {
    	if ( wp_startswith( $min_path, 'https://stats.wp.com/s-' ) ) {
    		return $min_path;
    	}
    
    	return $url;
    }
    add_filter( 'jetpack_get_file_for_environment', 'jetpackcom_fix_woo_script_path', 10, 3 );

    I’ve been getting the same issue. Unfortunately that snippet didn’t resolve the issue in GTMetrix.

    Perhaps this needs to be added to the plugin in an update?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    @jordanwebdev The next version of Jetpack will indeed include a fix for this issue, but the code snippet above should have solved the problem on your site. If it didn’t, you may be facing a different problem.

    Could you post a link to a page where you see the issue, so we can take a closer look?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Avoid bad requests at gtmetrix’ is closed to new replies.