Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » CSS cached?

#1 2006-11-28 05:55:53

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

CSS cached?

Hi, just wondering if the TXP caches the CSS via template system/database?

I prefer to not use TXP to manage my css, but I would like to know how TXP handles caching and styles… Is not it true that when a CSS file is served-up as a php file, some browsers will not cache the styles (unless you do some tricky header hacking)? Or, is it as simple as adding a “type” to the style call?: <style type=“text/css”>@import “mycss.php?n=foo”;</style>

Any info one could provide would be great. :D

Many TIA,
Cheers,
Micky

Offline

#2 2006-11-28 09:54:57

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: CSS cached?

TXP4.0.4 uses Last-Modified headers. On repeat visits, this ‘prevents’ TXP from having to send the complete style sheet to the browser each time. I don’t think the “type” attribute has any effect on this.

Offline

#3 2006-11-28 10:19:18

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

Re: CSS cached?

Excellent, thanks for that info Ruud. And, just to clarify, the styles are stored in the site database, and the “n” param is how one would switch/target other styles in the site DB?

Sorry if noob questions. I just want to make sure I understand how the system works. :)

Many thanks for your time Ruud, much appreciated. ;)

Cheers,
M

Offline

#4 2006-11-28 11:29:50

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: CSS cached?

Yes, n = to specify which stylesheet and all styles are stored in the database.
See also: textbook

Offline

#5 2006-11-28 12:04:42

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

Re: CSS cached?

Great! Thanks Ruud! :)

That pretty much answers all the questions I had. TXP rocks!

I really appreciate your time.

Have a great winter.

Cheers,
Micky

Offline

  1. Index
  2. » How do I…?
  3. » CSS cached?

Board footer

Powered by FluxBB