• Resolved Copiaurbietorbi

    (@copiaurbietorbi)


    Good day,

    We are trying to speed up the time it takes for our server to reply with the basic HTML as it seems is making the page loading very slow.

    We are using the autoptimize and far future extend header plugins and we were recommended to combine it with yours to solve this issue.

    We installed your plugin and followed some instructions for the settings that we found, but it seems they only apply for an older version. After trying several times, we didn’t see any significant changes in the speed.

    Could you provide with some recent instructions for setting your plugin to work with autoptimize please?

    This way we may have better results and perhaps solve this issue.

    In advance, thank you for your help and interest.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Anonymous User 16850768

    (@anonymized-16850768)

    Cache Enabler works well with Autoptimize and there are no additional steps required for the two plugins to work harmoniously together. What instructions have you followed that aren’t obtaining the results you’re wanting?

    When taking a look at your website I’ve found no errors, however, I do notice that your pages aren’t leveraging browser caching. I would recommend ensuring that the Cache-Control HTTP header is also being set on your pages content type (HTML). For example, this can be implemented by adding the following directive in your .htaccess mod_headers module:

    <FilesMatch "\.(php|html)$">
    Header set Cache-Control "max-age=604800"
    </FilesMatch>
    Thread Starter Copiaurbietorbi

    (@copiaurbietorbi)

    Hello Coreyk,

    Thank you for getting back to us. We have the value zero in cache expire and we have the mimification disabled in our settings for the cache enabler. This is because autoptimize is doing this work for us. Are these settings ok?

    We assume adding the directive you suggest is adding the code to our root .htaccess file. Is this correct? If so, should we add it at the beginning or at the end of it?

    On another note, we are using the far future expire header plugin. And in the link you kindly shared with us, it suggests adding code for the expire headers as well. Should we consider adding the code for the expire headers in the root .htaccess file also?

    Thank you for your help!

    Anonymous User 16850768

    (@anonymized-16850768)

    You’re welcome. Yes, the Cache Enabler settings you’ve defined are correct.

    The suggested directive would go inside of the mod_headers module, for example:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    <IfModule mod_headers.c>
    <FilesMatch "\.(php|html)$">
    Header set Cache-Control "max-age=604800"
    </FilesMatch>
    </IfModule>
    # END WordPress

    The Far Future Expiry Header plugin will modify your .htaccess file for you, which means to set your Expires HTTP header you’ll either want to use that plugin or modify your .htaccess yourself.

    Thread Starter Copiaurbietorbi

    (@copiaurbietorbi)

    Hello Coreyk,

    Thank you for getting back to us once more. We are using the far future expire plugin at the moment we are happy with it. So we are going keep it and add the code you kindly suggested in the .htaccess file.

    By the way (and please we apologize in advance if we mention an incoherence here), we noticed the far future expire plugin writes on the .htaccess file, but the one that is inside the wordpress binder, while other plugins write on the one that is in root/public.

    We assume that we can try your code after the writing of the far future extend plugin in the .htaccess file inside the wordpress binder. Is this correct?

    Thank you again for your help!

    Anonymous User 16850768

    (@anonymized-16850768)

    The aforementioned directive that sets the Cache-Control HTTP header for your pages should be added to the .htaccess file located in the root directory of your WordPress installation.

    Thread Starter Copiaurbietorbi

    (@copiaurbietorbi)

    Okie dokie muskogee!
    Thank you for your help Coreyk.
    We’ll try it out and will let you know how it went.

    Thread Starter Copiaurbietorbi

    (@copiaurbietorbi)

    Hello Coreyk,

    We hope this message finds you well. We tried out your solution but we didn’t noticed much difference with the load time. We added it under the code written by the far future extend plugin.

    We noticed the first part of your code differs than ours just a bit (see below):

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

    But we didn’t think this difference was important, but just a different way to code. So we tried yours first and then ours with the following addition (below) to make it similar to the one you gave us:

    <IfModule mod_headers.c>
    <FilesMatch “\.(php|html)$”>
    Header set Cache-Control “max-age=604800”
    </FilesMatch>
    </IfModule>

    But like we mentioned before, we didn’t notice much of a difference with the load time.

    Is your code compared to ours making any difference?
    Should we consider adding something else?

    Thank you for your help!

    Thread Starter Copiaurbietorbi

    (@copiaurbietorbi)

    UPDATE: We made a mistake.

    Good day Coreyk,

    We realized that we made a mistake and added the code to the wrong .htaccess file. We noticed the file you were referring to is on public_html and not on the wordpress binder.

    We checked there and the code is identical to the one you kindly shared with us and we just added the last part of it:

    <IfModule mod_headers.c>
    <FilesMatch “\.(php|html)$”>
    Header set Cache-Control “max-age=604800”
    </FilesMatch>
    </IfModule>

    However, we are still not seeing a difference. Should we change the cache time or what do you suggest?

    Thank you for your help and we apologize again for our mistake. But hey, success is try and fail from time to time right?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fast Loading HTML pages’ is closed to new replies.