Serve resources from a consistent URL

I am getting the following recommendations from the GTmetrix speed test:

1- "Serve resources from a consistent URL" this one is solved by disabling Smush Pro "WebP conversion" but in this case, images won't be converted to WebP. Would you please help me solve this issue without disabling the "WebP conversion"?

2- "Leverage browser caching" for this one I am trying to solve by activating Hummingbird caching but I get this message "Hummingbird detected an advanced-cache.php file in wp-content directory. Please disable any other caching plugins in order to use Page Caching." However, I can't disable this file as I am hosting on wordpress.com and I don't have access to files.
Would you please help me to solve this issue too?

  • Adam Czajczyk
    • Support Gorilla

    Hello Mark

    I hope you're well today and thank you for your questions!

    2- "Leverage browser caching" for this one I am trying to solve by activating Hummingbird caching but I get this message "Hummingbird detected an advanced-cache.php file in wp-content directory. Please disable any other caching plugins in order to use Page Caching."

    For "Leverage browser caching" suggestion the "browser caching" should be set which is a different tool than a Page Caching. Usually you can enable browser caching on "Hummingbird Pro -> Caching -> Browser Caching" page, however with wordpress.com many things are quite different.

    The browser caching is kind of cache that's performed directly by user browser - browser saves some assets for later use so it wouldn't have to download it over and over again when a given page is re-visited. The way browser does this can be controlled by webserver sending special HTTP headers. In other words, it's a webserver software (usually Apache or Nginx) that controls the browser caching behavior.

    Hummingbird can only enable/disable that webserver feature and set its parameters (so e.g. for how long such cache should be valid) and that is provided that server is already configured in a way that allows such settings to be changed. In case of Apache webserver this can be done by adding some rules to .htaccess file and on nginx it require slight changes in nginx configuration.

    It's my understanding that there's no access to nginx configuration on wordpress.com. In fact, there's barely any access to anything and that severely limits the options here. WordPress.com is a very specific platform and it's important to understand that while site's hosted there are powered by WordPress but it's very different solution than a self-hosted WordPress (which tools like Hummingbird are targeted at).

    https://kinsta.com/blog/wordpress-com-vs-wordpress-org/

    That being said, I'm afraid the only solution here is to talk to wordpress.com support and ask them if they could enable browser caching (with expiration times suggested by Google) for you for the site. They also do stick to their own caches so as long as it's set as it currently is and they deny making changes for you, I'm afraid you won't be able to enable Page Caching too (though that would only be an improvement but not a solution to "Leverage Browser Caching").

    1- "Serve resources from a consistent URL" this one is solved by disabling Smush Pro "WebP conversion" but in this case, images won't be converted to WebP. Would you please help me solve this issue without disabling the "WebP conversion"?

    WebP conversion can only be done if the CDN is enabled. However, I checked your site and I believe this is some sort of a "glitch" in GTMetrix tests. If you look closer at the site, you'll notice that these images in page source code are "included multiple times". I mean that there's a "srcset" attribute used for images in order to allow proper responsiveness.

    It basically means that there are multiple sizes of the same image "suggested" to the browser and browser decides - based on the current viewport size (e.g. device screen size) - which one to download and display.

    With CDN enabled that also changes URLs (due to conversion/resize options) in a way that they are different for the test, while originally it would be "the same image" but with just additional width parameters - that's simplified a bit but I hope you get the point. GTMetrix, ultimately, "recognizes" that as image served simultaneously while it really isn't - browser only gets multiple URLs but decides which one to fetch and display.

    This does lowers the score a bit but in fact doesn't affect speed, which can also be seen in GTMetrix results. Personally, I'd just keep WebP conversion enabled and ignored that GTMetrix recommendation as it's only affecting GTMetrix score.

    Kind regards,
    Adam

  • Mark
    • New Recruit

    Thank you so much. I'm having my trouble using asset optimization in hummingbird as well. Whenever I go in and compress the files and save. It seems that when I look at it again. The files become uncompressed again. Do you know why this could be happening?

  • Predrag Dubajic
    • Support

    Hi Mark,

    Thank you so much. I'm having my trouble using asset optimization in hummingbird as well. Whenever I go in and compress the files and save. It seems that when I look at it again. The files become uncompressed again. Do you know why this could be happening?

    I had a look at Asset Optimization on your site and I can see that the minification options are enabled for your files, can you explain a bit more what exactly you are seeing because this is how it looks on your end for me:

    Keep getting this screen error also.

    This usually means that there's fatal error going on somewhere, can you tell me where you're seeing this?

    Checking debug log should tell us more what is causing that issue.
    Can you enable debug log in your wp-config.php file (located in root WP folder) by replacing define('WP_DEBUG', false); with this code:

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set( 'log_errors', 1 );
    @ini_set( 'display_errors', 0 );

    Replicate that error screen again and this should create debug.log file in your wp-content folder that could tell us what is going on.
    Can you please save it as .txt file and attach it here so we can check it out.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.