WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
White empty boxes instead of images with CDN (10 posts)

  1. djnield
    Member
    Posted 4 years ago #

    Hi,
    I just don't get it so please help me out.

    Can I create a CNAME on a different domain and still use the mirror CDN feature?

    At the moment when I try I'm just getting white boxes where my images should be.

  2. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    There's not enough information to help here. Are you using an origin push provider? Have you exported all of your files already?

  3. djnield
    Member
    Posted 4 years ago #

    Ah sorry, I guess my explanation is really pants;

    The effect I was after was to 'serve images from a cookie free domain' and I used this article to use a subdomain instead of a proper paid for CDN.

    The CDN on subdomain trick worked using your plugin, but I was still serving cookies as they had originally been set on the root, so I wondered could I use a totally different domain as the CDN but in the same way as the article - in that the image files aren't physically held on the subdomain?

    Hope I made that last bit make sense?

  4. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    I'm not sure what cookies you have, but you can check the google analytics help pages for example to learn how to restrict those cookies to your main site. Once you do that for google analytics or anything else using cookies on your site, your subdomain will be cookie free.

  5. djnield
    Member
    Posted 4 years ago #

    Thanks,

    I followed some steps to make analytics not set cookies using the 'set domain' tip. I think I did it correctly but firebug still reports cookies being set from my images, css, js & html - so everything basically!

    I read that once a cookie has been set on ' *.domain.com ' then every subdomain you make e.g ' cdn.domain.com ' will also get cookies too and there's no way of stopping it.

    Is that true in your experience?

  6. efikim
    Member
    Posted 4 years ago #

    My experience is that if a cookie is set on domain.com every subdomain gets cookies. If it is set on http://www.domain.com then cdn.domain.com doesn't. It may vary depending on how the host sets things up though ... I've only tested on one host!

    lack of cookies on the static files on my site once I'd set up an FTP CDN was an unexpected bonus.

  7. djnield
    Member
    Posted 4 years ago #

    Cheers efikim,
    I think that seems to be the view of a few now, once they're set then they're always set.

    Frederick - If I get a completely new domain and keep it cookie free, would your plugin still work for me in the same way

    i.e. use the mirror cdn function of the plugin to point to the new domain for static files, or does that only work where the domain & subdomain are one of the same?

    I'm hoping to achieve this without needing to physically have the images stored on the cdn.

  8. TexInWien
    Member
    Posted 4 years ago #

    djnfield - You can set up a "fake" CDN that works with W3 Total Cache, as you describe.

    Depending on how good your host is, you can set up a cookie less domain and create symlinks to wp-content and wp-includes, meaning all of your images would be in one physical location, but they'd be served by the cookieless domain, while the dynamic stuff comes from your main domain.

    We've got this set up for our customers who don't want to spring for the full-on CDN option.

    Kurt

  9. djnield
    Member
    Posted 4 years ago #

    Kurt, that's exactly what I'm wanting to achieve but just not getting the results you'd expect. If I use a subdomain, I just can't stop the cookies. If I use a completely new domain I get the white boxes where the images should be.

    I'm not sure what symlinks are though. Is that something w3tc does or should I have done something myself regarding that?

  10. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Frederick - If I get a completely new domain and keep it cookie free, would your plugin still work for me in the same way

    Yes. Also the CDN stores copies regardless.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic