• Resolved icing

    (@icing)


    I came across this page, which gives the code to add at the top of the .htaccess to make use of browser caching.

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 2 days"
    </IfModule>
    ## EXPIRES CACHING ##

    Where does this code need to go? Custom Code Top?

    What is the best expiration period for my website which basically has mostly static content which is updated only once a month?

    Thanks

    https://www.ads-software.com/extend/plugins/bulletproof-security/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author AITpro

    (@aitpro)

    Yes, caching .htaccess code should come first before any rewrite .htaccess coding in your root .htaccess file. If you are also using a php/php.ini handler then you will need to also add that code to the Custom Code top box.

    I’m not sure what the best expiration period for your website would be.

    Thread Starter icing

    (@icing)

    I am not sure if I am using php/php.ini handler. I am new to wordpress and do not what that is. Pardon my ignorance. Thanks for the reply though.

    Thread Starter icing

    (@icing)

    I guess I am not using php handlers. I found this commented out line in .htaccess.

    # ADD A PHP HANDLER
    # If you are using a PHP Handler add your web hosts PHP Handler below

    Plugin Author AITpro

    (@aitpro)

    A php/php.ini handler is not a WordPress thing. If your particular web host allows you to use php/php.ini handlers then handlers will allow you to control what version of php is loaded and other things like loading CGI or FastCGI and adding a custom php.ini file for your website.

    @adityabajaj – please see the forum guidelines re: helping out here and posting links to your site:

    https://codex.www.ads-software.com/Forum_Welcome#Helping_Out

    @wpyogi thanks for reminding about the guidelines. In this case, how should i direct solution seekers to the information?

    Mostly, you should answer their questions here. IF it’s a current thread that has not been answered and a link to an outside resource is particularly relevant, it’s generally okay to post that. But when you’ve posted the same link in multiple OLD (some already resolved) threads, that’s pretty much outside what is considered okay.

    oh i see! I got you. However, before I had this information handy I had landed up on that old thread. So wanted to help users who land up on the old thread like i did. But I understand of what you mean here and will take care of it.

    Thread Starter icing

    (@icing)

    @adityabajaj if you have any information on this regards. Please post. I am always open to learning new things and making improvements. If possible just copy-paste the relevant information.

    I request moderator to let him post a link if he wishes to. After going through his link I will write a review here about it.

    Plugin Author AITpro

    (@aitpro)

    @icing – WordPress Forum Guidelines need to be followed so asking a Mod to make an exception for something that does not follow the WordPress Forum Guidelines in one case only leads to making exceptions in other cases. WordPress has Forum rules/guidelines in place for a reason. I have posting rules on all of my sites. If the rules are not followed then I do the exact same thing – let the person know what is not allowed and correct it. ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: BulletProof Security] Leverage Browser Caching via .htaccess’ is closed to new replies.