Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to figure out a way to use the CDN capabilities of W3TC while still allowing use of respond.js for IE8 compatibility. I am using my own theme, so I have full control over the files. I added the respond code with cross domain compatibility just below the wp_head() in header.php

<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/respond.js"></script>
<link href="<?php echo get_template_directory_uri(); ?>/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<link href="<?php echo get_template_directory_uri(); ?>/static/respond.proxy.gif'" id="respond-redirect" rel="respond-redirect" />
<script src="<?php echo get_template_directory_uri(); ?>/static/respond.proxy.js"></script>

In the W3TC CDN settings I have added {wp_content_dir}/themes/*/static/* to the rejected files list so that everything in the static directory will not be local. The problem is that respond.js and respond-proxy.html are not added to the CDN, they are also local. Perhaps this is because they are not being enqueued or because they are inside a conditional comment?

share|improve this question

put on hold as off-topic by G. M., Pieter Goosen, ialocin, birgire, Johannes Pille 17 hours ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – G. M., Pieter Goosen, ialocin, birgire, Johannes Pille
If this question can be reworded to fit the rules in the help center, please edit the question.