• Resolved JonRTW

    (@jonrtw)


    Hi,

    I have the following code in place within my functions, but the pages at /employees are still cached:

    add_filter('autoptimize_filter_noptimize','my_ao_noptimize',10,0);
    function my_ao_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'employees')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    I have put in some echoing and removed the return false to confirm it is running, and it is, but the disabling of caching isnt working

    • This topic was modified 7 years, 5 months ago by JonRTW.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    first to make sure; when writing

    the disabling of caching isnt working

    are you talking about page caching or about JS/CSS optimization?

    Thread Starter JonRTW

    (@jonrtw)

    Sorry, my mistake.
    It’s the page caching. If I clear the Autoptimize cache and reload, the changes appear. If I dont clear the cache and reload, nothing changes.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    page caching indeed is not handled by Autoptimize @jonrtw, happy it works after cache clear ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to exclude pages using autoptimize_filter_noptimize’ is closed to new replies.