Jump to content

Invision Board --> CSS- File


boenki

Recommended Posts

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.

:wacko:

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 :thumbup )

since this is a very big (and GREAT!) board you could save a lot of bandwith, I think.

...just a suggestion...

cu

Steffen

Link to comment
Share on other sites


good & right idea, i was informed of this on my own forum,

haven't done it yet

they'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">

Link to comment
Share on other sites

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.

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/\/

Link to comment
Share on other sites

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.

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.

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: :P

MSFN + Invisionboard + Opera = 2 seconds page-loading time!

Link to comment
Share on other sites

  • 1 month later...

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 :w00t:

Skins & Templates

Edit Settings

CSS Options

Cache 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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...