[theme-reviewers] Enqueue scripts from CDN

Matt Beall mbeall at starverte.com
Thu Aug 8 03:29:25 UTC 2013


So a theme shouldn't enqueue a CDN? I don't understand the reasoning behind this, but I am also wondering because my theme enqueues a CDN of Bootstrap. CDNs solve a lot of licensing issues and also decrease the size of a theme package. But if we shouldn't use CDNs, please let me know.

Matt Beall

On Aug 7, 2013, at 6.00 am, theme-reviewers-request at lists.wordpress.org wrote:

> Send theme-reviewers mailing list submissions to
> 	theme-reviewers at lists.wordpress.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> or, via email, send a message with subject or body 'help' to
> 	theme-reviewers-request at lists.wordpress.org
> 
> You can reach the person managing the list at
> 	theme-reviewers-owner at lists.wordpress.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of theme-reviewers digest..."
> Today's Topics:
> 
>   1. Re: Enqueue scripts from CDN (Edward Caissie)
> 
> From: Edward Caissie <edward.caissie at gmail.com>
> Subject: Re: [theme-reviewers] Enqueue scripts from CDN
> Date: August 7, 2013 5.32.02 am MDT
> To: "Discussion list for WordPress theme reviewers." <theme-reviewers at lists.wordpress.org>
> Reply-To: "Discussion list for WordPress theme reviewers." <theme-reviewers at lists.wordpress.org>
> 
> 
> @Josh - Yes, I recognized the font would have a fallback safety net of the browser default font (at worst), but since it is so easy to bundle a GoogleFont with a theme I see no reason to call it outside of the theme. It's a very specific example but true none the less.
> 
> Edward Caissie
> aka Cais.
> 
> 
> On Tue, Aug 6, 2013 at 10:49 PM, Josh Pollock <jpollock412 at gmail.com> wrote:
> @edward I think the important distinction between calling a font from Google Font and a library from a CDN is that if the browser can't get the font, it will use a default web font instead, while an unavailable script will all most always result in failure to function.
> 
> 
> On Tue, Aug 6, 2013 at 3:37 PM, Edward Caissie <edward.caissie at gmail.com> wrote:
> Personally I think "everything the theme calls that doesn't come from WordPress core *must* be bundled with the theme" without exception, including items such as GoogleFonts for the same reasons that @Otto mentioned, the installation may be found where there is potentially no direct access to the Internet by the "reader". Although if that is the case then the example GoogleFonts call would at worst fall back to the browser default(?) which one would hope still keeps the theme "readable" with just a loss of aesthetics.
> 
> Edward Caissie
> aka Cais.
> 
> 
> On Tue, Aug 6, 2013 at 3:15 PM, Chip Bennett <chip at chipbennett.net> wrote:
> Everything the Theme calls that doesn't come from WordPress core *must* be bundled with the Theme.
> 
> Just about the only exception to that rule is an API call such as GoogleFonts.
> 
> 
> On Tue, Aug 6, 2013 at 2:37 PM, Ola Łączek <ola at bodera.com> wrote:
> Hello!
> 
> Is it ok for theme author to enqueue scripts directly from CDN, and not include them with the theme?
> Example: <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
> And one more thing - is it ok to put scripts directly in header.php in conditional IE comments (<!--[if lt IE 9]> <![endif]-->)
> 
> Best regards,
> Ola Łączek
> 
> 
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> 
> 
> 
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> 
> 
> 
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> 
> 
> 
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> 
> 
> 
> 
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20130807/56377960/attachment-0001.html>


More information about the theme-reviewers mailing list