New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

The forum below will remain in read only mode.

Yay... Take Me to the Community!

Rant about including JS/CSS in Themes

You are not authorized to post a reply.
Sort:
Page 1 of 212 > >>
Will Strohl
New Member
New Member
Posts:40
Association Member
    Hello everyone:

    If you deliver themes to clients, please always use CDN paths for all JC/CSS libraries when at all possible, and your default choices for CDN and local client files should be minified.

    I had to get that off of my chest. I spent ~6 hours yesterday on a site doing this for a very well-known theme person/agency, for a custom theme package that I paid for. I cut the perceived and actual page load time by 50% with that update alone.
    Mitchel Sellers
    New Member
    New Member
    Posts:3
    Association Member
      Will - In some ways I would almost recommend against a portion of this though. If you use a CDN for each, it is very easy then for another module to register the same item and DNN will not properly handle the duplicates. (Thinking here of jQuery, jQueryUI, or Knockout as specific examples.) This Then gets us to multiple copies of the same script and that is a whole new torture.

      Minified files by default is a must though. ANd support for Client Resource Manager is also.
      Will Strohl
      New Member
      New Member
      Posts:40
      Association Member
        @Mitch: Honestly, I think you have that problem either way. There will be one in the theme and another in the module, versus one in the cloud and one in the module. Even if either/both were to create and include JavaScript library extensions, the root problem remains...

        At the end of the day, themes don't have settings, but modules do. Module developers have the opportunity (and responsibility) of providing settings to *not* include these kinds of files, in the event the theme already does.

        That being said, themes need to not include the proverbial "kitchen sink" when they're being sold commercially. Themes built for specific clients have the benefit of knowing exactly which libraries are required.
        David Poindexter
        New Member
        New Member
        Posts:7
        Association Member
          Commercial themes are very bloated these days and we run into these issues all the time. I feel your pain!
          Will Strohl
          New Member
          New Member
          Posts:40
          Association Member

            Posted By David Poindexter on 23 Aug 2016 08:29 PM
            Commercial themes are very bloated these days and we run into these issues all the time. I feel your pain!

            Agreed. Also, there are plenty of ways to include a ton of functionality like that and still have higher performance. The biggest issue I see and hear when this is brought up with vendors is, "Who's going to pay me to do that," and, "What if...?" We plan for far too many "what ifs".

            What if it was just faster and leaner, and clients paid more because of *that*?
            You are not authorized to post a reply.
            Page 1 of 212 > >>

            Hosting liberally provided by