max-age javascript files

33 views
Skip to first unread message

Re Style

unread,
Mar 27, 2014, 12:36:57 PM3/27/14
to mod-pagesp...@googlegroups.com

I have installed the google page speed module for apache, working fine except for the leverage browser caching. Without the page speed module I have a score of 94% @ gtmetrix. With the module on it drops to 84% due the lack of Leverage browser caching. I can't find any solution in the docs. I tryed adding

  • ModPagespeedForceCaching on
  • ModPagespeedEnableFilters extend_cache
  • ModPagespeedDisableFilters extend_cache
  • ModPagespeedModifyCachingHeaders off.

None of them fixes the issue, after adding them one by one i restarted apache. This is my .htaccess

ExpiresActive On

#CSS JS XML TXT - 1 MONTH
<FilesMatch "\.(xml|txt|css|js)$">
Header set Cache-Control "max-age=2678400, public"
ExpiresDefault "access plus 1 month"
SetOutputFilter DEFLATE
</FilesMatch>

#JPG JPEG PNG GIF SWF - 1 MONTH
<FilesMatch "\.(jpg|jpeg|png|gif|swf|JPG|JPEG|PNG|GIF|SWF)$">
Header set Cache-Control "max-age=2678400, public"
Header set Last-Modified "Wed, 05 Jun 2009 06:40:46 GMT"
ExpiresDefault "access plus 1 month"
SetOutputFilter DEFLATE
</FilesMatch>

#OTF ICO PDF FLV - 1 MONTH
<FilesMatch "\.(otf|ico|pdf|flv)$">
Header set Cache-Control "max-age=2678400, public"
ExpiresDefault "access plus 1 month"
SetOutputFilter DEFLATE
</FilesMatch>

#HTML HTM PHP
<FilesMatch "\.(html|htm|php)$">
SetOutputFilter DEFLATE
</FilesMatch>

What can I do to set the expiration time to a week (now 5 minutes) with the pagespeed module enabled?

Re Style

unread,
Mar 27, 2014, 4:20:03 PM3/27/14
to mod-pagesp...@googlegroups.com
Every .css or .js generated by pagespeed module has this problem on my server. Even google page speed insights says I need to enable browser caching...

Joshua Marantz

unread,
Mar 27, 2014, 4:31:11 PM3/27/14
to mod-pagespeed-discuss
Can you share the URL of your site?



On Thu, Mar 27, 2014 at 4:20 PM, Re Style <openca...@gmail.com> wrote:
Every .css or .js generated by pagespeed module has this problem on my server. Even google page speed insights says I need to enable browser caching...

--
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/865492e4-353c-419e-af9b-bdc78b05ca07%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Re Style

unread,
Mar 28, 2014, 3:15:54 AM3/28/14
to mod-pagesp...@googlegroups.com
Sure, http://goo.gl/xIxTO8  

Op donderdag 27 maart 2014 21:31:11 UTC+1 schreef jmarantz:
Can you share the URL of your site?

On Thu, Mar 27, 2014 at 4:20 PM, Re Style <openca...@gmail.com> wrote:
Every .css or .js generated by pagespeed module has this problem on my server. Even google page speed insights says I need to enable browser caching...

--
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.

Re Style

unread,
Mar 28, 2014, 3:36:50 AM3/28/14
to mod-pagesp...@googlegroups.com
and the ouput in gtmetrix: http://goo.gl/JtV9zs


Op donderdag 27 maart 2014 21:31:11 UTC+1 schreef jmarantz:
Can you share the URL of your site?



On Thu, Mar 27, 2014 at 4:20 PM, Re Style <openca...@gmail.com> wrote:
Every .css or .js generated by pagespeed module has this problem on my server. Even google page speed insights says I need to enable browser caching...

--
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.

Re Style

unread,
Mar 28, 2014, 6:00:42 AM3/28/14
to mod-pagesp...@googlegroups.com
Fixed it by doing: 

ModPagespeedJsPreserveURLs on
ModPagespeedImagePreserveURLs on
ModPagespeedCssPreserveURLs on

Op donderdag 27 maart 2014 17:36:57 UTC+1 schreef Re Style:
Reply all
Reply to author
Forward
0 new messages