• Resolved proturnkeys

    (@proturnkeys)


    Hi

    Trying to get some .js files to be picked by KeyCDN. 4 out of the 6 files are fvm minified and the other 2 are based on exclusions in FVM of cornerstone (part the X Theme framework). I have tried the CDN functionality of Cache Enabler and W3 Total Cache, but neither option gets my KeyCDN zone to pick these files up.

    https://mysite.com/wp-content/plugins/cornerstone/assets/dist/js/site/cs-head.js
    https://mysite.com/wp-content/uploads/fvm/cache/header-3dcc2851-0.min.js
    https://mysite.com/wp-content/uploads/fvm/cache/header-7435094b-0.min.js
    https://mysite.com/wp-content/uploads/fvm/cache/footer-fd1d22d4-0.min.js
    https://mysite.com/wp-content/plugins/cornerstone/assets/dist/js/site/cs-body.js
    https://mysite.com/wp-content/uploads/fvm/cache/footer-a5d92ba8-0.min.js

    Because ive wittled down my http requests they are actually all the JS files generated by my site at this point. CSS/PNG are being picked up. Will message KeyCDN as well to see if they might have some pointers.

    Regards
    Matt

    • This topic was modified 7 years, 6 months ago by proturnkeys.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Raul P.

    (@alignak)

    Hi,

    One question:

    Does the /cornerstone/assets/dist/js/site/cs-head.js and /cornerstone/assets/dist/js/site/cs-body.js need to be excluded for the theme to work (something broken), or is this just something you need to do in order to enable js deferring?

    In regard of CDN usage,
    did you select the option of either http or https on the settings page and are you using the https://www.ads-software.com/plugins/cdn-enabler/ plugin?

    Is your problem related with the urls not being rewritten to your cdn url, OR
    they are being rewritten but simply not cached on the cdn?

    If it’s simple a matter of the files not being cached on KeyCDN, be advised that the FVM plugin generates static files only.
    The headers sent when KeyCDN requests those files are provided by the server directly, so you may need to setup the server headers and the expires settings properly (this is valid for any js, css, fonts, images, etc).

    They have some technical info online.

    https://www.keycdn.com/support/cache-control/
    https://www.keycdn.com/blog/expire-header-and-cache-control/
    https://www.keycdn.com/blog/http-cache-headers/

    And you can also override those settings on their platform:
    https://www.keycdn.com/support/frequently-asked-questions/#override-default-cache-expiry-time

    Either way, please let me know if you can solve it.

    Thanks,

    Raul

    Thread Starter proturnkeys

    (@proturnkeys)

    Hi,

    Unfortunately I have to keep those exclusions because without it, when I attempt to accesss X, which is they’re page layout app (similar to Visual Composer for WP) it never loads. It basically just goes into an endless loop and shuts down WP admin completely from access. With those exclusions I can at least access X in “skeleton mode”, which gives me the functionality without the pleasant eye candy.

    In terms of the CDN plugin, i tried both CDN Enabler and the CDN section of W3 Total Cache.

    None of the URLs are being written to the CDN, they are still being pulled from the origin server, so https://mysite.com rather than https://cdn.mysite.com

    I thought it might be a headers issue, but maybe, if they are not being picked up at all, its something else?

    Regards
    Matt

    Plugin Author Raul P.

    (@alignak)

    Hi,

    Still in regard of the exclusions, when you try to open their page layout page, what urls do you see after example.com/

    I need to know because some editors do this on the frontend rather than on wp-admin, so as people report I add that to the internal blacklist and it should work fine.

    As for the CDN option, I’m quite familiar with KeyCDN and their plugin but I haven’t used it in a few months.

    I’ll need to test this on my end to see if something got broken either during one of their updates or mine and then

    Regardless of KeyCDN being a great server, if you’re looking for a CDN acceleration, you “should” be looking at the free plan on cloudflare, which doesn’t require you to rewrite urls and gives faster response times than keycdn (but keycdn comes close).

    In my opinion, cloudflare.com it’s the best cdn solution (can’t beat their network) and even comes with the free plan (cdn distribution is the same for both paid and free).

    Having said that, does the other “excluded” urls get rewritten, or none is rewritten?
    If you disable my plugin, do those get rewritten?
    And do you have some other plugin, such as a cache plugin that may be causing this?

    Regards,

    Raul

    Thread Starter proturnkeys

    (@proturnkeys)

    HI,

    I took away that exclusion and this time I could access the skeleton,but not the proper interface. Still, getting rid of the exclusion took off another 4 requests.

    The url is always https://example.com/x/
    If you are editing a file, like say the home page, it will be something like https://example.com/x/#/content/34

    Have a chat to theme.co for further information. I have seen one or two posts for support requests on their site regarding compatibility between their theme framework and FVM.

    Cloudflare is excellent. Only problem with them though is that to take true advantage of everything you need to use their DNS. This site im working on is testing DNS Made Easy, which is a premium DNS service and I must say it certainly beats my domain registrar. Big reduction in initial lookup time etc. Also this particular site will be using push zones, so I will be hosting big files on CDN for customers to download.

    None of those 6 urls I outlined are written to the CDN. They all appear from the origin server, but my CSS and PNG files come from the CDN.

    If I disable your plugin, the CDN picks up what is now at least 26 js files successfully. My http requests go from 16 to 52 and page load time increases by as much as a second. Its nasty. I do like your plugin, it does wonders and it doesnt seem to conflict with W3 Total Cache, unlike say Autoptimize which has done in the past for me.

    I am using Cloudways for my hosting on a Vultr plan so I would be using all the caching and performance features their plans come with. That might also be causing a problem?

    Regards
    Matt

    • This reply was modified 7 years, 6 months ago by proturnkeys.
    Plugin Author Raul P.

    (@alignak)

    Hi,

    Thanks for all the info.
    I’ll have a fix later for the X theme editing.

    As for the CDN Enabler plugin, I’ll see what I can do, but I need a couple of days maybe, to test things out.

    As for cloudflare, why not just use their dns service?
    It’s the same or better than DNS Made Easy (it’s also anycast) and it’s free.

    Furthermore, what I really like about it is that you can selectively enable or disable cloudflare per subdomain.
    Even better is when we have cloudflare enabled and then we need to change the hosting… the change would be transparent and immediate (it’s a load balancer, basically), unlike DNS which will need at least a few minutes.

    Either way, please be patient while I look into this for the next couple of days.
    It might be easier to disable js and css processing (fvm settings), while you need to edit things on the X theme.

    Thread Starter proturnkeys

    (@proturnkeys)

    Hi,

    I haven’t tried cloudflare yet with subdomains. Thats an interesting feature they have. Paid plan or free?

    Really appreciate you looking into a fix for X theme and CDN enabler. There seems to be thousands of people using X theme, its very popular so its probably worth it.

    I check back in a few days ??

    Regards
    Matt

    Plugin Author Raul P.

    (@alignak)

    Cloudflare free plan is the only needed by most people.
    There’s no benefit of using any paid plans (except the Business or Enterprise, if you need Layer 7 DDoS protection).

    Will update the topic once I have something.

    Plugin Author Raul P.

    (@alignak)

    Hi,

    I’ve added cdn url rewriting support, for the files generated by this plugin (only).
    You still need the CDN enabler plugin to rewrite other things, such as ignored files, images and other static assets.

    I’ll probably integrate all CDN enabler features in the future, so the CDN Enabler might not be needed at all in a few weeks.

    Give it a try with 2.0.7 and let me know if it worked, thanks.
    You need to add your cdn url in the plugin settings page.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘KeyCDN not caching FVM js files’ is closed to new replies.