Questions tagged [mod-pagespeed]

The mod_pagespeed modules are open-source server modules that optimize your site automatically.

mod_pagespeed is an open-source module written by Google that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving content from the server.

mod_pagespeed provides a pre-built binary package for HTTP server and a module for HTTP server.

mod_pagespeed includes several filter that optimize JavaScript, HTML and CSS stylesheets. It also includes filters for optimizing JPEG and PNG images. The filters are based on a set of best practices known to enhance web page performance. Webmasters who set up mod_pagespeed in addition to configuring proper caching and compression on their Apache distribution should expect to see an improvement in the loading time of the pages on their websites.

250 questions
2
votes
1 answer

HTACCESS Dynamic Variable within an IfModule tag

How To Get a Variable Inside IfModule? I want Apache to replace *%{HTTP_HOST}*.... can that be done within an IfModule tag? I am trying to setup Mod_Pagespeed in my .htaccess to work across multiple domains. This .htaccess file will be running on,…
bbullis
  • 532
  • 7
  • 20
2
votes
1 answer

Pagespeed console log size and overall impact on performance

I am using pagespeed_console to monitor my ngx_pagespeed performance, and in the long run I'll use this data to finetune ngx_pagespeed. https://developers.google.com/speed/pagespeed/module/console Just two days and a couple of hits and my log size…
ddutra
  • 1,459
  • 1
  • 14
  • 17
2
votes
1 answer

Pagespeed + nginx - not minifying css and javascript

I have about 14 css sheets and about 12 js files that need to load with my application. I am using google pagespeed. Instead of combining 14 sheets into 1 sheet its combining them into 3. Even javascript combination is not working really well but it…
Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96
2
votes
4 answers

using ngx_pagespeed or mod_pagespeed instead of minifying/optimizing javascript and CSS using a command-line tool

Can ngx_pagespeed, mod_pagespeed and other such modules that optimize javascript/css at the server level act as a replacement for command-line tools like uglifyjs or yui-compressor?
user9903
2
votes
1 answer

site rendering differently on different hosts

I have spent the last few hours trying to figure this out but still no luck...I think I have narrowed it down as something to do with a file permission issue on my host but maybe someone on here would be so kind as to point me in the right…
Ridings
  • 29
  • 3
2
votes
1 answer

mod_pagespeed image resizing when only width specified in stylesheet – possible?

mod_pagespeed does this nifty image-resizing, but only if "width= and height= attributes on the tag or an inline style= attribute" are set. This gets a bit problematic if you have e.g. an image blog with hundreds of posts and one day in the future…
unhammer
  • 4,306
  • 2
  • 39
  • 52
2
votes
1 answer

mod_pagespeed - How can I set Expires and cache update time?

I have interested in two things: T.1) mod_pagespeed has installed the Expires header value for each file except html,xml..., documents.So how can I change this time for each file and folder ? Can this module do that ? I hope example need not for the…
2
votes
2 answers

mod_pagespeed behind elastic load balancer

mod_pagespeed rewrites my css links from link href="/css/file.css" rel="stylesheet" to something like: link href="http://example.com/css/file.css.pagespeed.ce.97987.css" rel="stylesheet" The problem is that if file.css.pagespeed.ce.97987.css hasn't…
Jon E
  • 537
  • 3
  • 11
2
votes
1 answer

Check if ModPagespeed is allowed and enabled for the current domain via php

i'm trying to figure out how to check if ModPagespeed is enabled and allowed on the current domain via PHP. I've written the following code, but I'm not fully satisfied of this solution. It works, but it's a crock. Excerpt from .htaccess (serving…
chirale
  • 1,659
  • 16
  • 20
2
votes
1 answer

Internal links being changed by mod_pagespeed

I noticed that when using mod_pagespeed on my site it updates my internal links. When I am on / then my navigation looks like:
But when I am on /foo the same…
Sam
  • 4,437
  • 11
  • 40
  • 59
1
vote
1 answer

Missing files in mod_pagespeed - how do I find where they were requested?

Looking at my apache error logs i'm seeing a lot of 404 errors for resources such as JS & CSS. For example: [Tue Feb 21 14:41:58 2012] [error] [mod_pagespeed 0.10.21.2-1381 @7107] Fetch failed for…
Sam
  • 4,437
  • 11
  • 40
  • 59
1
vote
0 answers

mod_pagespeed doesn't work consistently as I expect

I have a weird behavioral problem on the mod_pagespeed apache module. Let's say I see the following part in the HTML. This is the normal output and this is what I expect…
1
vote
1 answer

Pagespeed Failed to read cache clean timestamp /var/cache/pagespeed/!clean!time!. Doing an extra cache clean to be safe

Stumbled upon the following error on nginx pagespeed running a stateless docker container hosted in cloud run. When testing locally i don't get the error after deployment the error is logged after almost every request. 2022-05-14 22:05:03.316…
xaander1
  • 1,064
  • 2
  • 12
  • 40
1
vote
1 answer

PageSpeed Insights API returning 401 error at seemingly random times

We are programmatically calling the PageSpeed Insights API for an internal list of websites. The majority of the time it works fine, but at seemingly random times we are getting the error "Request had invalid authentication credentials. Expected…
1
vote
0 answers

alternative for mod_pagespeed for IIS

Possible Duplicate: Is there an equivalent to mod_pagespeed appache module but for IIS? Is there an alternative for mod_pagespeed for IIS? I want to do some smart-caching and set the expires headers in a smart way.
user751939
  • 11
  • 1