Title: Exclude php included file from cache
Last modified: May 22, 2017

---

# Exclude php included file from cache

 *  [effekt](https://wordpress.org/support/users/effekt/)
 * (@effekt)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/exclude-php-included-file-from-cache/)
 * Hi,
 * i would like to exclude a file from cache.
    In the header of my wordpress site
   i have a query to detect if the user has got a mobile or desktop devicetype. 
   It is a simple if query with php. But naturally it does’nt work with the cache.
   i get the wrong result if the page was cached with a desktop device and i’m browsing
   on a mobile one. How can i handle that or is it not possible? thanks

The topic ‘Exclude php included file from cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [effekt](https://wordpress.org/support/users/effekt/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/exclude-php-included-file-from-cache/)
 * Status: not resolved