Jump to content


Photo
- - - - -
Open

How to compress the pagelines compiled css



  • Please log in to reply
16 replies to this topic

#1 studyworldglobal

studyworldglobal

    Member

  • Members
  • 19 posts

Posted 28 July 2012 - 06:54 PM

We are using WP Total Cache Plugin already with Enabled HTTP (gzip) compression for CSS & Js But still the test at Google Page Speed Insights shows the below error. Compressing the following resources with gzip could reduce their transfer size by 85.4KiB (82% reduction). Compressing

Please Login or Register to see this Hidden Content

could save 85.4KiB (82% reduction). How to compress the pagelines compiled css.

#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17919 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 29 July 2012 - 11:09 AM

Hi, You have a minify option for the Compiled CSS file. Which is located in Wordpress Admin Dashboard > Site Options > Advanced > Minification.

#3 studyworldglobal

studyworldglobal

    Member

  • Members
  • 19 posts

Posted 29 July 2012 - 01:51 PM

That's already done. The above issue is faced after all those changes.

#4 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 30 July 2012 - 06:16 PM

The css is already minified:

Please Login or Register to see this Hidden Content


To gzip you will have to turn the file mode on by adding the following to wp-config.php

Please Login or Register to see this Hidden Content


Over optimisation will actually slow your site down, especially as you have opted to use disk based object/database and page caching, most cheap shared hosts used network filesystems and are slow as custard.

#5 karenb

karenb

    Member

  • Members

  • 15 posts
  • Country: Country Flag

Posted 27 September 2012 - 10:37 AM

Please Help. Trying to increase site speed.
Please help me to gzip
. compiled css at 108kB
, /features/script.cycle.js?ver2.9994 at 50kB and ,
./script.bootstrap.mini.js?ver2.0.3 at 22 kB
www.pdmwa.net.au
I have:
. installed w3tc and I think it's working
. added define('LESS_FILE_MODE',true); to the wp-config,php file
. deactiveated 'use google libraries'
. smushed everything....
i'm on a shared server and will swallow the latency there.

#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 17919 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 27 September 2012 - 10:51 AM

Hi KarenB,

Can you provide a link to your website please. Also, if you're on shared hosting, this type of hosting isn't designed for performance, with web hosting you most definitely get what you pay for and if your hosting is $1 per year, then it doesn't really matter how much caching you do, it will always be slow. But providing us with a link will help us.

#7 karenb

karenb

    Member

  • Members

  • 15 posts
  • Country: Country Flag

Posted 27 September 2012 - 10:20 PM

Hi Rockstar,

www.pdmwa.net.au

Yes, I am on shared hosting which accounts for up to 6s of latency. This is bad but I'm stuck with it. the uncompressed compiled css and the others should be though..
thanks

#8 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 27 September 2012 - 11:11 PM

Firstly, as its already been suggested in this topic, enable the file mode.

Secondly compression is at server level, depending on your host and the server type you may be able to add something to .htaccess, ask your host if they support DEFLATE.

#9 karenb

karenb

    Member

  • Members

  • 15 posts
  • Country: Country Flag

Posted 30 September 2012 - 04:01 AM

Hi Karma,
I had already added
define('LESS_FILE_MODE',true); to the wp-config,php file
I will check on the server and DEFLATE.
However, some files are compressed whilst these are not. Webpage test reports::


GZIP encode all appropriate text assets: 50/100

289.0 KB total in compressible text, target size = 146.4 KB - potential savings = 142.6 KB

FAILED - (103.9 KB, compressed = 18.8 KB - savings of 85.1 KB) -

Please Login or Register to see this Hidden Content


FAILED - (49.9 KB, compressed = 13.5 KB - savings of 36.3 KB) -

Please Login or Register to see this Hidden Content


FAILED - (22.3 KB, compressed = 6.3 KB - savings of 16.0 KB) -

Please Login or Register to see this Hidden Content


FAILED - (5.9 KB, compressed = 2.4 KB - savings of 3.6 KB) -

Please Login or Register to see this Hidden Content


FAILED - (2.7 KB, compressed = 1.2 KB - savings of 1.5 KB) -

Please Login or Register to see this Hidden Content


Thanks, Karen


#10 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 30 September 2012 - 09:20 AM

Please Login or Register to see this Hidden Content

As i mentioned before, script compression is done on the server. It depends on whether the host has it enabled and the type of server software. Contact your host and ask how to compress css/js with DEFLATE.


#11 karenb

karenb

    Member

  • Members

  • 15 posts
  • Country: Country Flag

Posted 17 October 2012 - 05:06 AM

Hi Karma and Simon,
Still unable to compress compiled css and js.
Server says that deflate is supported and confirmed with their own ping test, results are copied below.

I was mistaken in saying that "some some files are compressed whilst these are not. Webpage test reports:
GZIP encode all appropriate text assets: 50/100"
None are compressed, I misunderstood the 50% part.

So -

Host says deflate is enabled and turned on
I had already added define('LESS_FILE_MODE',true); to the wp-config,php file
What can I do? Help.

From my server:
"According to our tech Ryan, we do support deflate on the server and it looks like you've turned it on (see below)
"Accept-Encoding: gzip,deflate'

Please Login or Register to see this Hidden Content


"HTTP/1.1 200 OK
"Date: Thu, 11 Oct 2012 05:29:57 GMT
"Server: Apache/2.2.11 (Unix) PHP/5.2.17 FrontPage/5.0.2.2635
"Vary: Accept-Encoding,Cookie
"Last-Modified: Wed, 10 Oct 2012 05:31:34 GMT
"Accept-Ranges: bytes
"Content-Length: 3206
"Cache-Control: max-age=96, public, must-revalidate, proxy-revalidate
"Expires: Thu, 11 Oct 2012 05:31:34 GMT
"X-Pingback:

Please Login or Register to see this Hidden Content


"X-Powered-By: W3 Total Cache/0.9.2.4
"Pragma: public
"Content-Type: text/html; charset=UTF-8
"Content-Encoding: gzip "

#12 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 October 2012 - 10:51 AM

Please Login or Register to see this Hidden Content

Go to this web page, insert any css/js link from your site for example this one

Please Login or Register to see this Hidden Content



The result is no compression enabled for js and css files. As I already said before this is a server level setting. Usually yu have to add something to .htaccess but your host will b abl to tell you.

#13 elegua

elegua

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 17 February 2013 - 03:15 PM

How do you tell the server to compress the PageLines CSS?



#14 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 February 2013 - 03:26 PM

How do you tell the server to compress the PageLines CSS?

Compression is done at a server level, depends on the server software you would need to ask you host.



#15 elegua

elegua

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 17 February 2013 - 05:58 PM

True. The server also runs the PHP code and hands out the HTML files. The server does compress .css files. However, PageLines does not create a .css file. Is there a way that PageLines can be told to create a .css file, and not pagelines-compiled-css_<random number string thing>? Maybe PageLines could just create a file like "pagelines-compiles-css.<randomnumber>.css and then a server, etc., would know what type of file it is? Unless you have an idea what the regex expression should be for the file so it can be identified as a css file to compress? Anything?



#16 elegua

elegua

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 17 February 2013 - 06:09 PM

- and the server is Apache, and it would / could use the deflate option, and for most who are using the W3, it already sets a directive to compress .css files. Point being, all other .css files are being compressed.

 

wp-content/themes/pagelines/pagelines-compiled-css-1_1361124053 = Not compressed

wp-content/plugins/photonic/include/scripts/fancybox/jquery.fancybox-1.3.4.css.gzip = compressed (note that it is recognized as a .css file)

 

 

 

<IfModule mod_deflate.c>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
        AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
        # DEFLATE by extension
        AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
</IfModule>



#17 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 17 February 2013 - 06:13 PM

It does create a CSS file. If you bothered to read the whole topic you will see the code to turn the file mode on. Fact is its an old topic and that code isn't even needed now as its turned on by default. If yours still isn't creating a file then there is something stopping it. Could be file permissions missing php extensions or a number of other things, this is why we ask people to open a new topic so we can support you and not bother the original poster with email alerts every time his old topic is bumped with unrelated questions. Sent from my iPad using Tapatalk HD