optimize pagespeed.ic ; pagespeed.ce files ?

736 views
Skip to first unread message

Jacques Mojsilovic

unread,
Feb 2, 2014, 9:11:05 PM2/2/14
to mod-pagesp...@googlegroups.com
Hello,

I followed instructions on how to add mod_pagespeed on my server and configure it. (Debian + Apache2)
When I run a test on insight : Link I notice some files are rewriten : 
I don' tget how to optimize them.

Any advise ?

Thanks in advance

Matt Atterbury

unread,
Feb 3, 2014, 7:38:22 AM2/3/14
to mod-pagespeed-discuss
When pagespeed rewrites a resource it changes the URL. The format is roughly:
<original-url>.pagespeed.<rewriter>.<hash>.<extension>
<rewriter> is a code that says what rewriting was done ('ic' and 'cf' above)
<hash> is a uniquefying hash of the resource's contents

So the above URLs say that the image was rewritten ('ic' ~= 'Image reCompression') and the CSS was rewritten ('cf' ~= 'Css reFormatted').

If that doesn't answer your question, what's the actual problem you're having?

m.


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/6a669299-791f-44df-a4df-ddbb6d8d7dbf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
"Klaatu barada nikto"                          (754) 444-6288

Jacques Mojsilovic

unread,
Feb 3, 2014, 4:19:14 PM2/3/14
to mod-pagesp...@googlegroups.com
Hello matterbuddy,

My question is, before adding mod_pagespeed on my server, I had no problems with header expiration instructed via .htaccess file see further down)
But since I added mod_pagespeed on my server, the header expire time is no longer taken in consideration for files renamed with <original-url>.pagespeed.<rewriter>.<hash>.<extension>
They hae 5 min freshness liftime...

The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

My .htaccess has the following instructions :

<IfModule mod_expires.c>

    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"

  # CSS
    ExpiresByType text/css                              "access plus 1 year"

  # Data interchange
    ExpiresByType application/json                      "access plus 0 seconds"
    ExpiresByType application/xml                       "access plus 0 seconds"
    ExpiresByType text/xml                              "access plus 0 seconds"

  # Favicon (cannot be renamed!) and cursor images
    ExpiresByType image/x-icon                          "access plus 1 week"

  # HTML components (HTCs)
    ExpiresByType text/x-component                      "access plus 1 month"

  # HTML
    ExpiresByType text/html                             "access plus 0 seconds"

  # JavaScript
    ExpiresByType application/javascript                "access plus 1 year"

  # Manifest files
    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
    ExpiresByType text/cache-manifest                   "access plus 0 seconds"

  # Media
    ExpiresByType audio/ogg                             "access plus 1 month"
    ExpiresByType image/gif                             "access plus 1 month"
    ExpiresByType image/jpeg                            "access plus 1 month"
    ExpiresByType image/png                             "access plus 1 month"
    ExpiresByType video/mp4                             "access plus 1 month"
    ExpiresByType video/ogg                             "access plus 1 month"
    ExpiresByType video/webm                            "access plus 1 month"

  # Web feeds
    ExpiresByType application/atom+xml                  "access plus 1 hour"
    ExpiresByType application/rss+xml                   "access plus 1 hour"

  # Web fonts
    ExpiresByType application/font-woff                 "access plus 1 month"
    ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
    ExpiresByType application/x-font-ttf                "access plus 1 month"
    ExpiresByType font/opentype                         "access plus 1 month"
    ExpiresByType image/svg+xml                         "access plus 1 month"

</IfModule>

I'm kinda lost, went from pagespeed grade A 93% et YSlow A 85% to A 89% & 78% on GTMetrix.
Check history @ Link

Also, now I have to defere parsing javascript created by mod_pagespeed :

293.5KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.


I have no idea how to fix this, maybe my pagespeed.conf is miss configured ?

This is the lines I added to pagespeed.conf :

ModPagespeedRewriteLevel CoreFilters
    ModPagespeedEnableFilters prioritize_critical_css
    ModPagespeedEnableFilters defer_javascript
    ModPagespeedEnableFilters sprite_images
    ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp
    ModPagespeedEnableFilters collapse_whitespace,remove_comments



Thanks for help !


Le lundi 3 février 2014 13:38:22 UTC+1, matterbury a écrit :
When pagespeed rewrites a resource it changes the URL. The format is roughly:
<original-url>.pagespeed.<rewriter>.<hash>.<extension>
<rewriter> is a code that says what rewriting was done ('ic' and 'cf' above)
<hash> is a uniquefying hash of the resource's contents

So the above URLs say that the image was rewritten ('ic' ~= 'Image reCompression') and the CSS was rewritten ('cf' ~= 'Css reFormatted').

If that doesn't answer your question, what's the actual problem you're having?

m.
On Sun, Feb 2, 2014 at 9:11 PM, Jacques Mojsilovic <jackp...@googlemail.com> wrote:
Hello,

I followed instructions on how to add mod_pagespeed on my server and configure it. (Debian + Apache2)
When I run a test on insight : Link I notice some files are rewriten : 
I don' tget how to optimize them.

Any advise ?

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Jacques Mojsilovic

unread,
Feb 5, 2014, 2:23:43 PM2/5/14
to mod-pagesp...@googlegroups.com
Up please, how can I prevent or change short liftime freshness for the files created by mmod_pagespeed ?

Thanks !

Joshua Marantz

unread,
Feb 5, 2014, 3:24:25 PM2/5/14
to mod-pagespeed-discuss
Did you see my response on your other thread?

Looking at your site I am mystified by the results, to be honest.  It looks like most of the images etc are being optimized as your HTML is being rewritten.  However, when your server responds with a request for an image, it's delivering the original version.

For example, viewed from Chrome, I see this in your HTML:

However your server responds with this when Chrome requests that URL.  Note the Content-Type: image/jpeg.  It should be "image/webp".  If we solve this problem, then we'll have a better idea why all the cache-control directives are "max-age=300,private".

  1. Response Headersview source
    1. Accept-Ranges:
      bytes
    2. Cache-Control:
      max-age=300,private
    3. Connection:
      Keep-Alive
    4. Content-Length:
      2918
    5. Content-Type:
      image/jpeg
    6. Date:
      Mon, 03 Feb 2014 13:24:58 GMT
    7. ETag:
      "3446e-b66-4f16e972f5200"
    8. Expires:
      Mon, 03 Feb 2014 13:29:58 GMT
    9. Keep-Alive:
      timeout=5, max=100
    10. Last-Modified:
      Sun, 02 Feb 2014 16:06:32 GMT
    11. Server:
      Apache
    12. Vary:
      Host

Can you describe in more detail what your server architecture looks like?  Are you employing a proxy cache?  Do you have different servers handling the HTML versus resources?  Do they all have the same versions of the resources copied to them?  Who puts in the ETag ("3446e-b66-4f16e972f5200")? That's not the kind of ETag that PageSpeed usually puts in.

-Josh


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/1686885a-a0c9-4acb-a2ff-7b0ed73a4e39%40googlegroups.com.

Jacques Mojsilovic

unread,
Feb 11, 2014, 4:17:26 AM2/11/14
to mod-pagesp...@googlegroups.com
Hello Josh,

sry for the delay, I decided to take everything from scratch and move to nginx.

Regards

Le lundi 3 février 2014 03:11:05 UTC+1, Jacques Mojsilovic a écrit :
Reply all
Reply to author
Forward
0 new messages