Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2012-07-11 17:57:47

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Hitting the limit for length of css input

Well that all goes back to what I said earlier. If we provided in core the option of serving your files from the database or from flat files (be they CSS, pages or partials) then that would be a great addition.

Two of the gripes I hear against Textpattern all the time are:

  1. Database storage of site style (templates & CSS)
  2. No wysiwyg editor for articles

Both of those can be achieved with currently available plugins but it would be nice if they were core features one day.

Offline

#14 2012-08-28 13:49:20

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: Hitting the limit for length of css input

philwareham wrote:

I’d strongly recommend not putting a large CSS file into the database, it’ll run like a dog in there.
In fact, I’d personally never put any CSS into the MySQL database, always better to serve it as flat files. Reasons have been discussed many times, like here.

For websites with low traffic – this is not a problem.

For more loaded websites makes sense to use external tools for caching. For sample:

webusers  => nginx(with internal cache) => apache => Textpattern => MySql => (LargeCSS1 + CSS2 + CSS3) <-- It's return as one file

All requests nginx static content from the cache without giving access apache/mysql/etc.
These are the static files: .css, .js, .txt, images(jpg, gif, png, ico, …) Nginx supports gzip compression for .css and .js

This scheme provides high performance.

I have the opposite is sometimes a desire to push the monsters js (jquery with his plugins) to MySQL. And return all js files as a single file.

But there are some problems:
  • Textpattern not store timestamp for css, that does not allow to create Last-Modified header for cache css. It also makes it difficult to develop and support css files in DB.
Offtopic:
  • Textpattern not store timestamp for page and form . It also makes it difficult to develop and support design in DB.
LargeOfftopic:
  • It would be nice to combine the three tables( txp_css, txp_page, txp_form ) in one. And set one structure: data field as mediumtext, timestamp, LastModID. I understand that this is not done, because there will be problems with compatibility with existing plugins.

aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#15 2012-08-28 13:57:06

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Hitting the limit for length of css input

@makss

Maybe post your comments on this in the ‘feature idea’s part of the ‘development’ section of this forum, it can be discussed on-topic then.

Cheers,
Phil

Offline

Board footer

Powered by FluxBB