boenki Posted May 6, 2005 Posted May 6, 2005 Hi there,I just took a look at the source of this board and wondered why the whole(?) CSS-Definitions are inside each page instead in a standalone CSS-File. It's about 17KB CSS-Code for each loading of any page in the forums that could be saved.I don't know how to do it on an Invision-Board but on my phpBB-Board I did it in about 4minutes.(cut it from the header; paste it to a CSS file; reference it )since this is a very big (and GREAT!) board you could save a lot of bandwith, I think....just a suggestion...cuSteffen
XtremeMaC Posted May 6, 2005 Posted May 6, 2005 good & right idea, i was informed of this on my own forum, haven't done it yetthey've said it can be done like this:<style type="text/css">@import url(http://www.url.com/name_of_file.css);</style><link href="http://www.url.com/name_of_file.css" rel="stylesheet" type="text/css">
un4given1 Posted May 6, 2005 Posted May 6, 2005 PHP compiles on the server side so the external CSS file is included in the page when compiled server side. It works this same way with every CSS file.
boenki Posted May 6, 2005 Author Posted May 6, 2005 PHP compiles on the server side so the external CSS file is included in the page when compiled server side. It works this same way with every CSS file.<{POST_SNAPBACK}>Ok, the CSS file might be a standalone one already.Than put into the source which is sended to me.Nevertheless I always download those 17KB from your server, right?If I understand it correctly..: If I just reference it it will be downloaded only once and cached in my browser.For my phpBB forum it works very nice. (Only the one-line reference in the code)Still didn't find anything how to do this on an Invisionboard.@XtremeMaC: where is your forum? What kind is it?OT@un4given1: nice Avatar! (Cried out loud when I saw it!)My favourite song: You Know What You Are!!greetSteffe/\/
prathapml Posted May 6, 2005 Posted May 6, 2005 PHP compiles on the server side so the external CSS file is included in the page when compiled server side. It works this same way with every CSS file.<{POST_SNAPBACK}>Exactly.Therefore, doing the kind of hacks as in phpBB..... dunno. That forum software has been GODDAMN slow, so it needs such hacks whereas Invision is very fast already.If I understand it correctly..: If I just reference it it will be downloaded only once and cached in my browser.For my phpBB forum it works very nice. (Only the one-line reference in the code)Still didn't find anything how to do this on an Invisionboard.<{POST_SNAPBACK}>What's there to be done?Invisionboard already does it. Most elements are already downloaded and shown from cache on Opera for me here.On a VERY slow connection, MSFN forum pages take an average of 2 seconds to load, no matter how heavy or whichever page (and I have set 30 posts/page). That's DEFINITELY because all elements of the page are already in my cache, its only the dynamic part being downloaded when requested.Here's a replay: MSFN + Invisionboard + Opera = 2 seconds page-loading time!
boenki Posted June 28, 2005 Author Posted June 28, 2005 Hello again,I just found out there IS the option in the Invision- Admin Control Panel to put the CSS code into a seperate file!It's here:ACP Skins & TemplatesEdit SettingsCSS OptionsCache CSS to text files?This will reduce the size of the HTML as the CSS will be in a browser cachable file.just for your information....Steffen
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now