• Resolved Karan

    (@peeyooshk)


    Hello:
    The CSS and JS files for our website are loading from two URLS (CDN and Application server) which in turn increases the load time and also bandwidth usage.

    We checked the same on GTmetrix and getting the results in “Serve resources from a consistent URL” header.

    Please help.

    Regards

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raul P.

    (@alignak)

    All resources are linked on the HTML as https://cdn-5ba9193bf911c8155452f262.closte.com/ but testing on gtmetrix, shows this for all resources on that cdn, even for other js and css files.

    In other words, this is something on the server side.

    Judging from the chrome dev tools, they setup canonical urls on the cdn.
    https://cdn.pbrd.co/images/HJtA0xT.png

    I suggest asking your hosting to disable canonical urls on the cdn or implement some other fix they see fit. This happens for all css and js resources on your site.

    In other words, this is something on the server side.
    No, hosting services cannot produce this issue.

    I suggest asking your hosting to disable canonical urls on the cdn
    No, the disabling of the canonical header will produce duplicate content.
    https://support.google.com/webmasters/answer/139066?hl=en

    or implement some other fix they see fit.
    This is a typical issue when WordPress users enabling every optimization feature.
    He is using HTTP PUSH (WP->Settings->Litespeed->Optimize tab) that`s why GT Metrix gives those warnings.
    And finally, HTTP PUSH won’t make WordPress faster.
    https://closte.com/blog/http2-server-push-faster-or-slower-for-wordpress

    Plugin Author Raul P.

    (@alignak)

    @closte thanks for the message.

    Well, when I said “server side” I meant to say, “hosting side”, however it doesn’t mean it’s some misconfiguration on your end, but rather that it’s something that your support team should be able to fix.

    Canonical urls are great for HTML, but I don’t see that the lack of canonical headers on images, css and JS files producing duplicate content. Images, I can see some relevance if you don’t have a custom cname, but not for css or js files. I would disable them regardless, for css and js files.

    HTTP Push indeed, is frequently abused by less tech savvy users, but it can be useful.
    However, with HTTP2 and stuff like the QUIC protocol on your network, you should perhaps consider removing that feature or enable it on demand via support.

    Thanks for clarifying the issue.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘CSS and JS loading from two URLS’ is closed to new replies.