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>
<![endif]-->

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.