Title: js script and css file rendered dynamicaly
Last modified: August 31, 2016

---

# js script and css file rendered dynamicaly

 *  Resolved [greatsmurf](https://wordpress.org/support/users/greatsmurf/)
 * (@greatsmurf)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/js-script-and-css-file-rendered-dynamicaly/)
 * Hi,
 * I just want to tell I was not able to use CDN Enabler with DropBox because a 
   case like this one with the plugin All-in-One Event Calendar by Time.ly :
 * <script type=’text/javascript’ src=’[http://cdn.yourdomain/?ai1ec_render_js=common_frontend&is_backend=false&ver=2.3.8′></script&gt](http://cdn.yourdomain/?ai1ec_render_js=common_frontend&is_backend=false&ver=2.3.8′></script&gt);
 * Just because a php script is called to create dynamicaly the js code. And same
   thing with some css files.
 * I decided to modify the php script called cdn_enabler_rewriter.class.php and 
   added one line :
 * if (strstr($asset[0], ‘/?’)) return $asset[0];
 * in the following function to make it work :
 * protected function rewrite_url($asset) {
    $blog_url = $this->blog_url;
 *  if ($this->exclude_asset($asset[0])) return $asset[0];
    if (strstr($asset[0],‘/?’))
   return $asset[0];
 *  // check if not a relative path
    if (!$this->relative || strstr($asset[0], $
   blog_url)) return str_replace($blog_url, $this->cdn_url, $asset[0]);
 *  return $this->cdn_url . $asset[0];
    }
 * [https://wordpress.org/plugins/cdn-enabler/](https://wordpress.org/plugins/cdn-enabler/)

The topic ‘js script and css file rendered dynamicaly’ is closed to new replies.

 * ![](https://ps.w.org/cdn-enabler/assets/icon-256x256.png?rev=2472538)
 * [CDN Enabler](https://wordpress.org/plugins/cdn-enabler/)
 * [Support Threads](https://wordpress.org/support/plugin/cdn-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/cdn-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cdn-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cdn-enabler/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [greatsmurf](https://wordpress.org/support/users/greatsmurf/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/js-script-and-css-file-rendered-dynamicaly/)
 * Status: resolved