Load from CDN?
  • Just wondering if there are any plans to ever put prettyPhoto (or other "pretty plug-ins") on a CDN... (I have not seen it on any CDN.) With the prettyPhoto javascript being around 22k minified, I think it would be worth having it available on a CDN. We would just need an established way to test if it was actually loaded from a CDN so a fallback to our server could be provided.
  • Found it on cdn.jsdelivr.net...

    //cdn.jsdelivr.net/prettyphoto/3.1.6/css/prettyPhoto.css
    //cdn.jsdelivr.net/prettyphoto/3.1.6/js/jquery.prettyPhoto.js

    Be aware that I found that the file urls that are shown when clicking the Integration button are incorrect.

    For a local fallback to a server, I used the following:
    -------------------------------------------
    <script>
    if (typeof $.fn.prettyPhoto !== "function") {
    $("head").append('<link href="/js/prettyPhoto/css/prettyPhoto.css?v=3.1.6" media="screen" rel="stylesheet"/>');
    document.write('<script src="/js/prettyPhoto/js/jquery.prettyPhoto.js?v=3.1.6"><\/script>');
    }
    </script>



Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter