• Resolved wilfried1954

    (@wilfried1954)


    Hello,

    I’m getting cached pages where they should not. However I’m not sure what is exactly cached in my situation. I try to explain:

    I have a form in Calculated fields form. The user fill in a reference, and that reference is used as a filename. As the user proceed filling in the form he has the option to download a report in MS Word format.

    The download button execute the following url: https://mysite/printreport?filename=filename&other=otherpars… (from the content of the filled in fields) and the first parameter is the filename that printreport.php will generate.

    printreport.php is a php file that search for the parameters in the GET and create a dynamically report in MS Word that the user download. Nothing comes in the browser, only the choice to open the MS Word document or download it. It is not a template file. There is no content created in the WordPress editor, it is all coded.

    So the original GET is printreport, but the filename to download can be different.

    I should prevent it from cache! But also when users fill in the same filename, witch is possible!

    Is this possible, eventually in the php code of printreport.php to exclude the file (the generated download file) from cache?

    Thank you, Wilfried

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @wilfried1954

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    Have you tried to add the page /onderhoudsgeldcalculator-hobin/ to Performance>Page Cache>Advanced>”Never cache following pages” filed?
    Make sure to do that and save all settings and purge the cache once done.
    You can also add the constant constant is define('DONOTCACHEPAGE', true); to your template which will prevent the page to be cached.
    Thanks!

    Thread Starter wilfried1954

    (@wilfried1954)

    Hi Marko,

    define('DONOTCACHEPAGE', true); in the php file do the job.

    Thank you, Wilfried

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘excluding dynamic pages’ is closed to new replies.