Title: Exclude pdf files
Last modified: January 10, 2019

---

# Exclude pdf files

 *  Resolved [wilmers](https://wordpress.org/support/users/wilmers/)
 * (@wilmers)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/exclude-pdf-files/)
 * Hello,
 * We’re using the plugin user access manager on a website to hide certain pdf files
   from not logged in users.
 * However when I visit a hidden pdf file when logged in it becomes also visible
   for not logged in users (different browser).
 * After deleting autoptimize’s cache it’s hidden again.
 * I’ve already tried the solution offered on the URL below by changing ‘test’ to‘
   pdf’, but unfortunately that doesn’t work.
    [https://quvor.com/exclude-posts-pages-autoptimize/](https://quvor.com/exclude-posts-pages-autoptimize/)
 * Is there a way to exclude pdf files from autoptimize?
 * Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/exclude-pdf-files/#post-11072684)
 * AO doesn’t cache PDF’s (or HTML), just optimized JS & CSS. but when clearing 
   AO’s cache AO will try to also purge your page cache, so the problem is _very
   likely_ your page cache, which you’ll indeed have to tweak (but I suppose not
   by excluding PDF’s, but by excluding the pages from/ in which the PDF’s are shown).
 * hope this helps,
    frank
 *  Thread Starter [wilmers](https://wordpress.org/support/users/wilmers/)
 * (@wilmers)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/exclude-pdf-files/#post-11072780)
 * Thank you for the quick reply.
 * That is what I thought as well, but it happens when I directly go to the .pdf
   file in the browser. I’m gonna try to exclude the complete User Access Manager
   plugin from autoptimize.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/exclude-pdf-files/#post-11073050)
 * ok, feel free to keep me updated 🙂
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/exclude-pdf-files/#post-11104826)
 * will mark as resolved as not in AO’s scope, but feel free to update with your
   findings [@wilmers](https://wordpress.org/support/users/wilmers/) ! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Exclude pdf files’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/exclude-pdf-files/#post-11104826)
 * Status: resolved