• Resolved issacchua

    (@issacchua)


    Hello,

    I am not sure if you are able to help, but I am just going to leave my question here.

    The issue is that when the request hits the server and the cache page is not generated or staled, the whole HTML page will stop loading. If you hit the refresh button on the browser, then only the page can load properly.

    If I turn on the page debug mode, then the page can load successfully even if the cache is missed. This is truly some very weird stuff that bothers me for a while, even though a refresh can solve this, but I still want to get to the bottom of it. Thanks!

    Here’s some information you might be interested: my nginx version 1.20, php version 7.4.19. Prior to the upgrade, my nginx version was 1.18, php version was 7.4.7 I believe?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter issacchua

    (@issacchua)

    Hello, I think I have found the culprit.

    It was the Browser Cache > Enable HTTP (gzip) compression that is causing the issue.

    If I disable it, then it will work. If I enable it, then it will show the broken page that can’t even load (basically just blank page and freeze there).

    The funny part is, I don’t even change the settings on the nginx.conf (my nginx.conf doesn’t get overwritten to protect the value) and simply turning that off, things will work correctly.

    May I know if that is the right way to temporarily fix such problem? Any potential drawback for doing so? Thanks again.

    Thread Starter issacchua

    (@issacchua)

    It actually doesn’t make sense.

    Something is wrong with it. My CSS/JS/HTML are all compressed with gzip when I run the inspection on the requests.

    Not sure why unsetting them (gzip compression) in the W3 cache options can fix the problem I had…

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @issacchua

    Thank you for reaching out.
    As I’ve stated in the other topic you mentioned this issue, most likely you have a double compression, meaning the gzip is enabled on the server or Zlib compression, or with some other plugin.
    I’ve checked this on a couple of websites on PHP 7.4 + and there are no issues whatsoever with the gzip compression.
    Please double-check if you have some server rules to compress your files and make sure to share the website URL
    Thanks!

    Thread Starter issacchua

    (@issacchua)

    Hi Marko,

    Thanks for your reply. I have seen the other posts that talk about compression stuff but it is not my case here.

    To iterate, with my previous PHP version 7.4.7(I believe), it is working fine but after I upgrade to PHP version 7.4.19 along with the nginx up to 1.20, it is not behaved as before. I am not sure if that has anything to do with this issue.

    My server is running nginx. I have not used any other gzip or zlib compression or other plugin. W3 Cache is the only plugin that I used, the configuration is the one that generates by W3 Cache.

    You can check it out this link below:

    https://www.test.menusifudemos.com/

    Type other URLs that will cause 404, ex: https://www.test.menusifudemos.com/blahblah

    Please note that the second time you revisit the same link, the page can be displayed properly. It only occurs on the first time (when the page cache is missed).

    Thanks a lot Marko!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @issacchua

    Thank you for the information.
    I’ve checked your website on different browsers and I am seeing no issue whatsoever.
    I can see that the gzip is active but there is no page breaking or anything similar.
    Thanks!

    Thread Starter issacchua

    (@issacchua)

    Hi Marko,

    Thanks for your reply.

    I have uploaded a video to show you what I am seeing on my browser (Chrome version: 91.0.4472.77).

    https://drive.google.com/file/d/1jpj5ZePW6RFoJb8SWl4WFXPLYDG1wpJn/view?usp=sharing

    I have tried running incognito mode on Google Chrome, Edge, or on Mobile Chrome, all of them are having the same issue.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @issacchua

    Thank you for providing the information.
    Honestly, this is the first time I am seeing this. As I see the page is 404 but it’s not showing the HTML, only the server info.
    I’ve tried to replicate the behavior on other websites with the gzip enabled however I was not able to replicate the issue.
    Tried to upgrade and downgrade the PHP but always got the same result.
    Thanks!

    Thread Starter issacchua

    (@issacchua)

    Yes, I know that is super weird.

    I have replicated the same site on another domain:

    https://www.test-2.menusifudemos.com/

    Both are hosted on the same server with the same configuration, except that on the second one, I update master.php so that on the line 591, I change the value to false:

    “browsercache.html.compression”: false,

    The test-2.menusifudemos.com does not have the same issue as test.menusifudemos.com.

    Since the nginx’s configuration file is not modified, so the spec is still the same as before.

    I use dev tools to inspect the HTTP requests, its header contains content-encoding: gzip , and the size is indeed being compressed as well (6.3kb/17.8kb).

    • This reply was modified 3 years, 9 months ago by issacchua.
    Thread Starter issacchua

    (@issacchua)

    I did some research:

    So basically if I don’t enable the Gzip from Browser Cache section (provided by W3 cache), I get the page size about 9.7kb over 34kb.

    If I enable it (and allow manually reload the page), I get the page size 8.5kb over 34kb.

    I guess that might be one of the advantages to use the compression provided by W3 Cache?

    But still, hopefully this issue can still be identified though. Otherwise I am just pulling off my hairs figuring why…??

    Thread Starter issacchua

    (@issacchua)

    Hello Marko,

    I decided to use the gzip from Nginx for the compression instead of the one from W3 Cache. So I will mark it as resolved. Thank you for your time.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Page cache miss breaks the webpage’ is closed to new replies.