Go Back   Pligg Forum > Announcements > Drawing Board
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-23-2007, 05:59 PM
en3r0 en3r0 is offline
Constant Pligger
 
Join Date: Apr 2006
Location: USA
Posts: 573
Downloads: 23
Uploads: 0
Thanks: 32
Thanked 24 Times in 20 Posts
How To: Optimize Your CSS Even More

A nice article I found about speeding up the css part of your site. I figured this could be applied to pligg as well in our search for a faster pligg site.

uses php and zlib.

http://paulstamatiou.com/2007/03/18/...css-even-more/
__________________
God bless,
-en3r0

Torrop.com - Torrent and P2P News
MemeVote.com - Find and vote on Memes
Reply With Quote
The Following User Says Thank You to en3r0 For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 03-23-2007, 06:42 PM
Simon Simon is offline
Innovator
 
Join Date: Mar 2006
Posts: 581
Downloads: 22
Uploads: 1
Thanks: 14
Thanked 126 Times in 61 Posts
Yep, a very good tip, and works well for javascript files too. The real benefits of compression come from compressing these type of files in my opinion, not simply the html.

If you have a large number of js / css files in a directory and don't want to change them all (ie. feeling lazy ), you can add 2 files to the directory that will do the job for you (needs htaccess access and zlib enabled):

.htaccess
Code:
AddHandler application/x-httpd-php .css
php_value auto_prepend_file css.php
php_flag zlib.output_compression On
css.php
Code:
<?php 
header("Content-type: text/css; charset: UTF-8");
header("Cache-Control: must-revalidate");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 3600) . " GMT");
?>
You can change css to js to get the same results with javascript files.
__________________

Reply With Quote
  #3 (permalink)  
Old 03-23-2007, 07:50 PM
kbeeveer46's Avatar
kbeeveer46 kbeeveer46 is offline
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,579
Downloads: 62
Uploads: 6
Thanks: 255
Thanked 651 Times in 515 Posts
You can speed up your Pligg site dramatically by gzipping your CSS file. It almost cut the loading time in half when I did testing with it.
__________________
I accept donations for my time helping users like you on the forum and IRC.

FREE and premium Pligg Web Hosting (NO ads, Includes MySQL, PHP, PHPMyAdmin, and Control Panel) - PM me for discounts on premium packages or if you would like a custom-made package. Paypal accepted.
Reply With Quote
  #4 (permalink)  
Old 03-23-2007, 09:25 PM
en3r0 en3r0 is offline
Constant Pligger
 
Join Date: Apr 2006
Location: USA
Posts: 573
Downloads: 23
Uploads: 0
Thanks: 32
Thanked 24 Times in 20 Posts
can we expect to see these things in the next release?
__________________
God bless,
-en3r0

Torrop.com - Torrent and P2P News
MemeVote.com - Find and vote on Memes
Reply With Quote
  #5 (permalink)  
Old 10-09-2007, 01:55 PM
darkonen darkonen is offline
New Pligger
 
Join Date: Sep 2007
Posts: 22
Downloads: 40
Uploads: 0
Thanks: 3
Thanked 2 Times in 2 Posts
Thumbs up Combine php and css in one file

Hi all, i've been searching for optimizing js and css, i thought this links could be useful if anyone tries to optimize.
WP css OptimizerThis one is a plugin of wordpress to optimize the js in one file and the css in other
rakaz combine.phpAnd this one is a standalone php script to combine js and css.
I have no skills programming so i haven't implemmented yet to my site, but i think it can be useful
Reply With Quote
  #6 (permalink)  
Old 01-24-2008, 09:44 AM
Geoserv Geoserv is offline
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 854
Downloads: 60
Uploads: 0
Thanks: 75
Thanked 49 Times in 45 Posts
Robson » CSS Compressor seems to be the most reliable CSS compressor.

And Dojo ShrinkSafe -- the safe way to make your JS sprightly seems to be a very good Javascript compressor. It took thickbox from 11kb to 7kb for me.

Geoserv
Reply With Quote
  #7 (permalink)  
Old 01-27-2008, 03:33 PM
Divisive Cotton's Avatar
Divisive Cotton Divisive Cotton is offline
Pligg Donor
 
Join Date: Sep 2007
Posts: 221
Downloads: 15
Uploads: 0
Thanks: 2
Thanked 12 Times in 7 Posts
I tried Dojo and it didn't make any difference in the size of the file for me...

Did you click on the 'strip newline chars?' box?

I wouldn't use one of the automatic CSS compressors - it's best to do it manually, although the PHP trick as listed above works well....
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
How to optimize pligg to load faster NeoKnight General Help 21 01-05-2008 05:47 PM


LinkBacks Enabled by vBSEO 3.0.0