Title: Load CSS files async
Last modified: August 10, 2022

---

# Load CSS files async

 *  Resolved [krzd7](https://wordpress.org/support/users/krzd7/)
 * (@krzd7)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/load-css-files-async/)
 * Hello,
 * I’d like to set a path for loading CSS files async, so it should match any file,
   including subfolders.
 * Is it possible? Like /my/path/*
 * Thanks.

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

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/load-css-files-async/#post-15906962)
 * [@krzd7](https://wordpress.org/support/users/krzd7/) THe Wild card will not work
   with CSS Async, you’ll have to add the full path including the css file name
 *  Thread Starter [krzd7](https://wordpress.org/support/users/krzd7/)
 * (@krzd7)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/load-css-files-async/#post-15907577)
 * Thanks [@bornforphp](https://wordpress.org/support/users/bornforphp/) ,
 * Is there a way I can set a fixed “Current cache path”? It contains a dynamic 
   subfolder, for example: /var/www/html/wp-content/cache/wpo-minify/**1660215890**/
   assets
 * I’m running WordPress on a serverless infrastructure (Cloud Run) and having CSS
   issues with this plugin. It does not occur very often, but sometimes I need to
   refresh the page in order to properly receive the CSS. It seems that it breaks
   because the plugin uses the MySQL wp_options table to store last cache timestamp.
   I needed that timestamp to be stored locally or check if that folder exists prior
   to serving its cached content.
 * For now, I had to turn off the “Enable page cache” option.
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/load-css-files-async/#post-15909985)
 * [@krzd7](https://wordpress.org/support/users/krzd7/) The cache files are dynamically
   generated, even if you set the path, the new files will get created, in this 
   case you’ll have to manually purge the cache.
 *  Thread Starter [krzd7](https://wordpress.org/support/users/krzd7/)
 * (@krzd7)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/load-css-files-async/#post-15911748)
 * I see, so there is no built-in way to control this last cache timestamp variable
   locally or fix set it to a specific folder instead of using the database config,
   right?
 * If that feature could be added it would help a lot in this case of running serverless
   WordPress installs. So, each container would handle its own cache files, without
   setting a global property that could mess with other instances cache requests.
 * Is there a way I can force the plugin to check for directory/files prior to serving
   cached content? Or serve a more recent version/regenerate cache in case it does
   not exist.
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/load-css-files-async/#post-15912928)
 * [@krzd7](https://wordpress.org/support/users/krzd7/) At the moment you can’t 
   force the plugin to check for directory/files prior to serving cached content.
 * I’ll pass on this request to our development team, so that it can be implemented
   in next release.
 *  Thread Starter [krzd7](https://wordpress.org/support/users/krzd7/)
 * (@krzd7)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/load-css-files-async/#post-15913520)
 * Thanks a lot.
 * I’ve tried a few other cache plugins that did not break the resources on serverless,
   but scored significantly lower compared to WP-Optimize.
 * Another question. If I have the cache enabled but my repository does not include
   the advanced-cache.php file, will it get automatically generated on first page
   load or should I configure it and add to my repository? I see there are a few
   hardcoded paths in there. Atm I’m configuring it accordingly to my remote host
   settings/path and adding to the repository, but if it gets generated I may consider
   removing.
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/load-css-files-async/#post-15916047)
 * [@krzd7](https://wordpress.org/support/users/krzd7/) Yes the advanced-cache.php
   file gets automatically generated, you’ll just have to set the permissions to
   wp-content folder, so WP-Optimize can write the file.

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

The topic ‘Load CSS files async’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Harshad](https://wordpress.org/support/users/bornforphp/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/load-css-files-async/#post-15916047)
 * Status: resolved