[wp-hackers] Using wp-content/uploads to store dynamically created js and CSS
nicola.peluchetti at gmail.com
Thu Jan 9 13:14:05 UTC 2014
we've gone that route before and it's a total pain. We have more than
100.000 installs of our plugin and we've had countless problems. Gzipping
was a pain too. We will provide this as a fallback but we will try to store
things in wp-content/ourfolder as Otto suggested.
Thanks to all of you for your help and suggestions.
*Nicola Peluchetti - Senior PHP Developer @ Timely*
Twitter: @nik_peluchetti <https://twitter.com/#!/nik_peluchetti>
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Mobile: +39 339 7507235
On Thu, Jan 9, 2014 at 11:06 AM, Nikola Nikolov <nikolov.tmw at gmail.com>wrote:
> I've seen a similar solution, where the generated JS/CSS was stored in the
> DB - I know it's not the best solution(since it's still going to load most
> of WordPress just to grab that code from the DB), but it seems like an okay
> one. Plus if you do output some caching headers(where it says "#Add caching
> headers" in his code), then most of the users browsers should have
> caching(I believe all modern browsers have caching enabled by default, so
> you have to know what you're doing in order to disable it - for instance
> developers do that when debugging stuff).
> On Thu, Jan 9, 2014 at 10:33 AM, Justas Butkus <jbutkus at time.ly> wrote:
> > Hello Brian.
> > If I see it right, and please correct me if I miss something, your
> > proposed solution gives best performance, when site uses a CDN, or at
> > has a caching reverse HTTP proxy in front of WordPress.
> > In general case - sites don't have anything like this. And then every new
> > user (some of whom might have troubles with cache, but let's say that's
> > just some 15% increase in traffic) requires your site to build that file.
> > the WordPress isn't even touched, but with your approach every request by
> > each new user causes new generation, which might impose significant
> > increase in resources utilization.
> > Maybe you have some considerations how to counter-act that?
> > I mean except recommending each and every user to have a
> > CDN/caching-proxy, which would be good, just as good as asking everyone
> > use PHP 5.5, which was discussed here few weeks ago. :-)
> > --
> > Regards,
> > Justas B.
> > 2014.01.09 00:35, Brian Fegter rašė:
> > Nicola,
> >> Instead of generating an actual static file, why not use a rewrite? You
> >> won't have to deal with the file system at all and any quirks that come
> >> with your setup.
> >> Heres a gist with the setup I use for this type of thing. This allows
> >> to use object caching and your CDN sees this as a static file as well.
> >> https://gist.github.com/inspectorfegter/8325711
> >> Let me know if you have any question on this approach. Just another way
> >> skin a cat.
> >> Thanks!
> >> Brian
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers