Speed up your site.. lose {stylesheet}

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm

Re: Speed up your site.. lose {stylesheet}

Post by Russ »

Thanks Pierre, but I don't use a seperate results page.
a. If I did would this help?
b. How do I set a page to be non-cachable?

Russ
alby

Re: Speed up your site.. lose {stylesheet}

Post by alby »

Russ wrote: Thanks Pierre, but I don't use a seperate results page.
a. If I did would this help?
Maybe  ???

Russ wrote: b. How do I set a page to be non-cachable?
In Option tab of page, uncheck Cachable

Alby
mngujara

Re: Speed up your site.. lose {stylesheet}

Post by mngujara »

thanks! works great for me.

one of my pages went from 15 sec (whoa!) to under 1.8 sec. Amazing, EVEryONE SHOULD DO THIS!!!!!
nedbenj

Re: Speed up your site.. lose {stylesheet}

Post by nedbenj »

This certainly helped to speed up my site too, but I had the same problem with a disappearing header image as this person did:
Henrik,

Tried this plugin, and I nearly got it working; the pictures in the header (placed there by the stylesheet), don't show up. the rest of the page is shown. I removed the plugin, in case you wanted to look. My site iswww.uisge-beatha.eu (http://www.uisge-beatha.eu)

Regards,
Gregor
He cured his problem like this:
Walking through the hall, I suddenly thought it might have to do with the directory path. In my stylesheet it is:
Code:

  background: url(uploads/images/logo_links1.gif) no-repeat 0 0px;


I replaced it with (don't know how to change color inside a code or quote, I placed a / before uploads):
Code:

  background: url(/uploads/images/logo_links1.gif) no-repeat 0 0px;


Now it's working :)
But this doesn't work for me and my header image is still missing. Has anyone else had this problem?
cyberman

Re: Speed up your site.. lose {stylesheet}

Post by cyberman »

Do you have the tag {metadata} between ... ?
nedbenj

Re: Speed up your site.. lose {stylesheet}

Post by nedbenj »

Thanks for the reply... yes I do.
cyberman

Re: Speed up your site.. lose {stylesheet}

Post by cyberman »

Have you tried to change the url path from relative to absolute?
Pierre M.

Re: Speed up your site.. lose {stylesheet}

Post by Pierre M. »

nedbenj wrote:
...it might have to do with the directory path. In my stylesheet it is:
Code:

  background: url(uploads/images/logo_links1.gif) no-repeat 0 0px;


I replaced it with (don't know how to change color inside a code or quote, I placed a / before uploads):
Code:

  background: url(/uploads/images/logo_links1.gif) no-repeat 0 0px;


Now it's working :)
But this doesn't work for me and my header image is still missing. Has anyone else had this problem?
Hello, I haven't read the CSS spec for some time but I think paths in CSS are relative to the CSS they are in. This is not CMSms specific. maybe something like url(../../myfolder/file.jpeg) can help.

Pierre M.
nedbenj

Re: Speed up your site.. lose {stylesheet}

Post by nedbenj »

Excellent support guys, that's solved the problem.
Thank you very much!
Courty
Forum Members
Forum Members
Posts: 15
Joined: Thu Jan 10, 2008 9:29 am

Re: Speed up your site.. lose {stylesheet}

Post by Courty »

Hi Guys,

Just rolled out static_stylesheet to a few of my CMSMS 1.2.3 "Black Rock" sites and can't believe the difference it makes..
At least 150% faster right across the board.

you do how ever have to change the default menu style sheets from:
background: url(uploads/images/xxx.gif) no-repeat 0 0px;
to:
background: url(/uploads/images/xxx.gif) no-repeat 0 0px;

adding the leading slash.

Also, on one I forgot to create the /stylesheet/ folder in the root - it really doesn't like that  ;)

Courty  8)
www.debinternet.co.uk - UK based CMSMS & Full Access Linux Webhosting, Site Design and Custom Coding..
Courty
Forum Members
Forum Members
Posts: 15
Joined: Thu Jan 10, 2008 9:29 am

Re: Speed up your site.. lose {stylesheet}

Post by Courty »

Got another tip for you..

after adding the {static_stylesheet} fix, my pages were generating in .25 to .5 seconds (which is much better than the 1 second before).
just doing some system work / tidying and ran a MySql 5 table optimize across the whole DB (Google it to see how to do it for your DB).

Page generation is now down to ~.15 secs with the best I've seen so far being about .11 secs for a simple page !

great stuff !!

Courty  8)
www.debinternet.co.uk - UK based CMSMS & Full Access Linux Webhosting, Site Design and Custom Coding..
yorgi63
Forum Members
Forum Members
Posts: 108
Joined: Fri Aug 25, 2006 4:35 pm

Re: Speed up your site.. lose {stylesheet}

Post by yorgi63 »

Strange thing this work on a few sites and now on the latest it is not working. Seems that background and the headers will not work. Very strange.

Here is the head tag.


{* Change lang="en" to the language of your site *}



{sitename} - {title}
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{static_stylesheet}
{* This is how all the stylesheets attached to this template are linked to *}
and the style sheet area:
/*****************
basic layout
*****************/
body {
  background-color: #0B4E69;
  color: #0B4E69;
  margin:1em; /* gives some air for the pagewrapper */
}

/* center wrapper, min max width */
div#pagewrapper {
  border: 0px solid black;
  margin: 0px auto;    /* this centers wrapper */
  background: url(/images/innerback.jpg);
  color:#000;
  width: 836px;
}


/*** header ***
we will hide text and replace it with a image
we need to assign a height for it
*/

div#header {
  height: 143px; /* adjust according your image size */
  background: url(/images/topbanner.jpg);         
}

div#header h1 a {
/* you can set your own image here */
  background: url(/images/topbanner.jpg)no-repeat 0 12px;;
  display: block;
  height: 143px;            /* adjust according your image size */
  text-indent: -999em;  /* this hides the text */
  text-decoration:none; /* old firefox would have shown underline for the link, this explicitly hides it */
}
Nothing appears until I remove the "static" part and the extra "/". I dropped the "functin" in the plugins area but is there something that needs to come out?

Thanks in advance,

Yorgi
Last edited by yorgi63 on Thu Mar 13, 2008 8:08 pm, edited 1 time in total.
Post Reply

Return to “Tips and Tricks”