mod_pagespeed empty style tag

225 views
Skip to first unread message

Luigi Maroncelli

unread,
Feb 24, 2015, 6:52:48 AM2/24/15
to mod-pagesp...@googlegroups.com
Hi all,
in some pages page_speed rewrites my linked css with 

<style></style>


in my htaccess I also disabled rewrite_css 

ModPagespeedDisableFilters rewrite_css

but nothing changes....

Can you help me ?

Thanks in advance.

Luigi


Luigi Maroncelli

unread,
Feb 24, 2015, 6:54:11 AM2/24/15
to mod-pagesp...@googlegroups.com

Version I use is 1.9.32.2

Jeff Kaufman

unread,
Feb 24, 2015, 8:33:15 AM2/24/15
to mod-pagespeed-discuss
Could you share a link to your site? Or a big cut-and-paste of the
relevant html?
> --
> 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/c4482d25-f061-4320-ba57-5a7ed84f8484%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Luigi Maroncelli

unread,
Feb 24, 2015, 8:43:52 AM2/24/15
to mod-pagesp...@googlegroups.com
Hi Jeff,
thnaks for your replay...


as you can see in the source code, at the bottom of the page

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2007570-1']);
_gaq.push(['_setDomainName', 'info-alberghi.com']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>
<style></style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

instead of 

<style>
</style>

there should be this link

<link rel="stylesheet" type="text/css" href="www.info-alberghi.com/css/style.css">

A thing like this happens also in other pages randomly


Il giorno martedì 24 febbraio 2015 14:33:15 UTC+1, Jeff Kaufman ha scritto:
Could you share a link to your site?  Or a big cut-and-paste of the
relevant html?

On Tue, Feb 24, 2015 at 6:54 AM, Luigi Maroncelli <lmaro...@gmail.com> wrote:
>
> Version I use is 1.9.32.2
>
>
> Il giorno martedì 24 febbraio 2015 12:52:48 UTC+1, Luigi Maroncelli ha
> scritto:
>>
>> Hi all,
>> in some pages page_speed rewrites my linked css with
>>
>> <style></style>
>>
>>
>> in my htaccess I also disabled rewrite_css
>>
>> ModPagespeedDisableFilters rewrite_css
>>
>> but nothing changes....
>>
>> Can you help me ?
>>
>> Thanks in advance.
>>
>> Luigi
>>
>>
> --
> 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

Jeff Kaufman

unread,
Feb 24, 2015, 9:46:02 AM2/24/15
to Shawn Ligocki, mod-pagespeed-discuss
When I append ?PageSpeedFilters=+debug it says:

<style></style><!--CSS rewrite failed: Cannot improve
http://www.info-alberghi.com/css/style.css-->

That's very weird; just because pagespeed can't improve a resource
doesn't mean it should remove it.

If I turn on rewrite_css, with ?PageSpeedFilters=debug,rewrite_css I see:

<link rel="stylesheet" type="text/css"
href="http://www.info-alberghi.com/css/A.style.css.pagespeed.cf.aDqQRUaJ0h.css">

which looks right. Similarly if I set only debug,inline_css I see:

<link rel="stylesheet" type="text/css"
href="http://www.info-alberghi.com/css/style.css"><!--CSS not inlined
since it&#39;s bigger than 2048 bytes-->

which is also correct.

When I turn off any filter that was set, even ones that seem
completely unrelated like collapse_whitespace or add_head, I get:

<link rel="stylesheet" type="text/css"
href="http://www.info-alberghi.com/css/style.css"><!--CSS not inlined
since it&#39;s bigger than 2048 bytes--><!--CSS rewrite failed: Cannot
improve http://www.info-alberghi.com/css/style.css--><!--Image does
not appear to need resizing.--><!--Image has no transparent pixels and
is sensitive to compression noise.--><!--The image was not inlined
because it has too many bytes.--><!--Image does not appear to need
resizing.--><!--Image has no transparent pixels and is sensitive to
compression noise.--><!--The image was not inlined because it has too
many bytes.--><!--Image does not appear to need resizing.--><!--Image
has no transparent pixels and is sensitive to compression
noise.--><!--The image was not inlined because it has too many
bytes.--><!--Image does not appear to need resizing.--><!--Image has
no transparent pixels and is sensitive to compression noise.--><!--The
image was not inlined because it has too many bytes.--><!--Image does
not appear to need resizing.--><!--Image has no transparent pixels and
is sensitive to compression noise.--><!--The image was not inlined
because it has too many bytes.--><!--The image was not inlined because
it has too many bytes.--><!--Image does not appear to need
resizing.--><!--Image has transparent pixels and is sensitive to
compression noise.--><!--The image was not inlined because it has too
many bytes.--><!--4xx status code, preventing rewriting of
http://www.info-alberghi.com/images/sprite.png--><!--Fetch status not
set when IsSafeToRewrite was called, preventing rewriting of
http://www.info-alberghi.com/images/sprite.png--><!--4xx status code,
preventing rewriting of
http://www.info-alberghi.com/images/triangle-price.png--><!--4xx
status code, preventing rewriting of
http://www.info-alberghi.com/images/triangle-price.png--><!--4xx
status code, preventing rewriting of
http://www.info-alberghi.com/images/triangle-price1.png--><!--4xx
status code, preventing rewriting of
http://www.info-alberghi.com/images/triangle-price1.png--><!--4xx
status code, preventing rewriting of
http://www.info-alberghi.com/images/logo-small.png--><!--4xx status
code, preventing rewriting of
http://www.info-alberghi.com/images/logo-small.png-->

Shawn, any ideas?
>> > email to mod-pagespeed-di...@googlegroups.com.
> --
> 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/e171d497-3d75-4e07-a52d-0e27fa66767a%40googlegroups.com.

Shawn Ligocki

unread,
Feb 24, 2015, 11:46:10 AM2/24/15
to Jeff Kaufman, mod-pagespeed-discuss


>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/mod-pagespeed-discuss/c4482d25-f061-4320-ba57-5a7ed84f8484%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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

Shawn Ligocki

unread,
Feb 24, 2015, 1:39:27 PM2/24/15
to mod-pagespeed-discuss
Can you try purging the cache?

I noticed that your CSS file has a 1 year cache lifetime. Have you changed it recently? This might have happened if style.css was every empty and got saved into the cache that way.


>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/mod-pagespeed-discuss/c4482d25-f061-4320-ba57-5a7ed84f8484%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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

Luigi Maroncelli

unread,
Feb 25, 2015, 3:47:32 AM2/25/15
to mod-pagesp...@googlegroups.com
Hi Shawn,
we opened a ticket to our hosting for purging the cache...
We also have enabled all filters we need so we can test what was going on.

How much time we have to wait before a filter takes effect ?

Luigi Maroncelli

unread,
Feb 25, 2015, 4:56:38 AM2/25/15
to mod-pagesp...@googlegroups.com
Ok, cache purging is enabled 

Shawn Ligocki

unread,
Feb 25, 2015, 11:22:23 AM2/25/15
to mod-pagesp...@googlegroups.com
It looks like this is working correctly now, do you agree? Do you see any pages with this problem any more?

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/d84c8381-32bf-4eb4-a34e-1aa1b1545f8e%40googlegroups.com.

Luigi Maroncelli

unread,
Feb 26, 2015, 3:30:04 AM2/26/15
to mod-pagesp...@googlegroups.com
Hi,
yesterday all seem to work correctly, but now if you look at http://www.info-alberghi.com/hotel.php?id=255 (or others hotels) only the first time (!) the page is corrupted;
if you debug you can see:

<style media="all"></style><!--CSS rewrite failed: Cannot improve http://www.info-alberghi.com/css/all-schedahotel.css-->
<meta name="Download-Settings" content="['http://www.info-alberghi.com/css/ui-lightness/']"/>
<style></style><!--CSS rewrite failed: Cannot improve http://www.info-alberghi.com/css/ui-lightness/lightness.css-->


near the bottom of the page...

If you refresh the problem disappear...
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Luigi Maroncelli

unread,
Feb 26, 2015, 5:12:53 AM2/26/15
to mod-pagesp...@googlegroups.com
Hi,
I had to disable mod_pagespeed entirely, because also if I disabled rewrite_css and rewrite_js the page still did not work....
tell me If you want to test  but I can leave this poor page only for a few time... 

Thanks

Luigi

Joshua Marantz

unread,
Feb 26, 2015, 7:41:02 AM2/26/15
to mod-pagespeed-discuss
Hi -- I can't seem to find anything wrong with your page when turning MPS via query param: http://www.info-alberghi.com/hotel.php?id=255&ModPagespeed=on&PageSpeedFilters=+debug

In what way is the page corrupted?

Note that you have prioritize_critical_css enabled, which (I think) means that rewrite_css will be enabled even if you turn it off.

The debug messages about not being able to improve your CSS files make sense; it looks like they are minified already.
-Josh

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/f95cac9d-30b1-4445-be08-13744b394686%40googlegroups.com.

Luigi Maroncelli

unread,
Feb 26, 2015, 8:26:42 AM2/26/15
to mod-pagesp...@googlegroups.com
Hi,
when rewrite_css and rewrite_javascript where enabled 2 css files where removed (empty style tags in place) and the page was corrupted as the css file was not load.
If now I enable again these 2 filters probably it takes time before the error occured again...
Only one file was already minified (lightness.css), now I unminified both and I'll enable MPS...
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

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

Joshua Marantz

unread,
Feb 26, 2015, 8:29:01 AM2/26/15
to mod-pagespeed-discuss
Just to reduce the number of variables, could you also temporarily disable prioritize_critical_css ?

Thanks,
-Josh


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/8456da70-b868-463d-bf44-898a37242950%40googlegroups.com.

Luigi Maroncelli

unread,
Feb 26, 2015, 8:42:20 AM2/26/15
to mod-pagesp...@googlegroups.com
Ok, I disabled it; now looks like better... but the gallery still seems to be corrupted...
Thanks 
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

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

Jeff Kaufman

unread,
Feb 26, 2015, 8:46:16 AM2/26/15
to mod-pagespeed-discuss
How is the gallery corrupted?

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/13baddcd-bc00-479e-916c-ceaf903bce83%40googlegroups.com.

Luigi Maroncelli

unread,
Feb 26, 2015, 8:56:48 AM2/26/15
to mod-pagesp...@googlegroups.com
http://www.info-alberghi.com/hotel.php?id=1125

all links in the gallery do not work and also slide images can't load

Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

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

Luigi Maroncelli

unread,
Feb 26, 2015, 8:58:55 AM2/26/15
to mod-pagesp...@googlegroups.com
aahahhhhhhhhhhhh... http://www.info-alberghi.com/
now also home page is corrupted like yesterday

<style></style>

still empty style tag

Joshua Marantz

unread,
Feb 26, 2015, 10:38:12 AM2/26/15
to mod-pagespeed-discuss
One more thing Luigi -- can you try putting

    ModPagespeedInPlaceResourceOptimization off

in your pagespeed.conf?  Again, I don't have any particular reason to suspect that this is the problem but it's another variable, and one notable difference between 1.8 and 1.9 is that we turned in-place optimization on whenever CoreFilters is enabled.

-Josh

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/a50dc370-9286-4749-8c00-60332011f626%40googlegroups.com.

Luigi Maroncelli

unread,
Feb 26, 2015, 10:49:04 AM2/26/15
to mod-pagesp...@googlegroups.com
Ok, I've asked this to the hosting...
But now hotel pages work correctly (es: http://www.info-alberghi.com/hotel.php?id=1125)
and only hp is corrupted..
We have unminified all css and js.... (and we still have rewrite_css and rewrite_javascript disabled....)

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

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

Luigi Maroncelli

unread,
Feb 27, 2015, 3:42:44 AM2/27/15
to mod-pagesp...@googlegroups.com
Hi,
today all works like a charm... but we have rewrite_css, rewrite_javascript and prioritize_critical_css disabled.
Next monday we will go to enable at least rewrite filter and we let you know what's will happen.
Thanks for support. 
Best regards.

Luigi
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscribe
...

Joshua Marantz

unread,
Feb 27, 2015, 7:42:29 AM2/27/15
to mod-pagespeed-discuss
Great,  The change that made it all work was turning off InPlaceResourceOptimization.  Is that right?

Please keep us posted as you turn back on the other filters.

Assuming that InPlaceResourceOptimization was the critical change; we need to figure out what's wrong with that because it's on by default for all mod_pagespeed users.  Can you tell us anything about your server configuration?  One thing I noticed looking at your headers is that it says "server:nginx" and "X-Mod-Pagespeed:1.9.32.2-4321".  This means you are running Apache as well.  Is Apache/mod_pagespeed serving your content and nginx acting as a proxy?  Or vice versa?  What exactly is the serving path for your CSS files?  Do they get generated by a PHP script or are they static on your disk?

Thanks,
-Josh

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/3e6d980a-9a39-4b81-a470-505b8690b22a%40googlegroups.com.

Luigi Maroncelli

unread,
Feb 27, 2015, 8:32:16 AM2/27/15
to mod-pagesp...@googlegroups.com
Ok Josh...
this morning we turn InPlaceResourceOptimization off but now homepage (http://www.info-alberghi.com/) is still corrupted (empty style tags) since a couple of hours. 
Our assets are static, saved in webroot subfolders.

For our server configuration I asked for it to our hosting and I 'll you now asap.

Luigi 
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Shawn Ligocki

unread,
Mar 11, 2015, 2:48:23 PM3/11/15
to mod-pagesp...@googlegroups.com
Luigi, it looks to me like your site is working correctly now, do you agree? When I visit http://www.info-alberghi.com/ , I see


<link rel="stylesheet" type="text/css" href="http://www.info-alberghi.com/css/style.css">

correctly in the source code.

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/8fcb48d8-935a-4fc9-824d-6bef63bb772b%40googlegroups.com.

Luigi Maroncelli

unread,
Mar 12, 2015, 4:37:00 AM3/12/15
to mod-pagesp...@googlegroups.com
Hi Shawn, now the site is working correctly, but we steel have rewrite_css, rewrite_javascript and prioritize_critical_css disabled. 
When we're going to enable it I let you now... perhaps next week.
For our server configuration I can tell you:

Nginx works as reverse proxy
Apache handles all contents
Page speed works as Apache module


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

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

Shawn Ligocki

unread,
Mar 12, 2015, 11:11:32 AM3/12/15
to mod-pagesp...@googlegroups.com
Thanks Luigi,

I think we have an idea about what configuration is causing this problem.

It would help us to debug this if you can:
1) Disable combine_css, extend_cache_css, inline_css, rewrite_css
2) Set ModPagespeedInPlaceResourceOptimization on
3) Restart Apache for that to take effect.

I believe this will not break your site (please let me know if you do see any breakages). But it will let me test some things remotely.

Alternatively, if you have a test domain you could reproduce this on, let me know.

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/8678ffc8-b113-4bad-84eb-11f29d09089d%40googlegroups.com.

Shawn Ligocki

unread,
Mar 16, 2015, 11:26:59 AM3/16/15
to mod-pagesp...@googlegroups.com
Luigi, are you able to make these changes to help us debug the issue?

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

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

Luigi Maroncelli

unread,
Mar 16, 2015, 12:12:34 PM3/16/15
to mod-pagesp...@googlegroups.com

Hi Shawn,
I made changes you asked for ... let me know if this help you to debug and when I can restore...

Thanks
Luigi
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

Shawn Ligocki

unread,
Mar 19, 2015, 11:20:21 AM3/19/15
to mod-pagesp...@googlegroups.com
You can restore Luigi. Unfortunately this did not help to debug.

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/c85798f4-ef22-4ac7-9885-611d2c8c9859%40googlegroups.com.

Shawn Ligocki

unread,
Apr 9, 2015, 3:25:14 PM4/9/15
to mod-pagesp...@googlegroups.com
Luigi, have you been able to install the debug version of mod_pagespeed I sent you? It looks like your site is still running the old version.

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Luigi Maroncelli

unread,
Apr 10, 2015, 3:23:39 AM4/10/15
to mod-pagesp...@googlegroups.com
Hi Shawn,
I'm quite sure I've not received any mod_pagespeed..where have you sent this?

You received this message because you are subscribed to a topic in the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mod-pagespeed-discuss/yVq1l7Yw73w/unsubscribe.
To unsubscribe from this group and all its topics, 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/CACNG_47DDG9Et0XUun%3DLHNh5P3NMoDNLxjCKgMy3HPVu54_pZQ%40mail.gmail.com.

Shawn Ligocki

unread,
Apr 10, 2015, 10:20:31 AM4/10/15
to mod-pagespeed-discuss
Here is the debug binary for CentOS 64-bit systems:



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/CAC%3DC8ABZTn2SXBrLBqwmhzLMSH%3Dq-WLzwrmo-cg8bO1PGw1N2A%40mail.gmail.com.

Luigi Maroncelli

unread,
Apr 13, 2015, 3:24:18 AM4/13/15
to mod-pagesp...@googlegroups.com
The debug version has installed...

Shawn Ligocki

unread,
Apr 13, 2015, 11:19:24 AM4/13/15
to mod-pagesp...@googlegroups.com
Thanks Luigi. Can you turn ModPagespeedInPlaceResourceOptimization on again?

Shawn Ligocki

unread,
Apr 13, 2015, 12:48:23 PM4/13/15
to mod-pagesp...@googlegroups.com
Now let me know if you get any errors in your log that contain: Empty resource in IPRO for URL

Shawn Ligocki

unread,
Apr 17, 2015, 10:56:13 AM4/17/15
to mod-pagesp...@googlegroups.com
Hey Luigi, have you seen any errors with "Empty resource in IPRO for URL"? Any problems since you installed the new version and turned IPRO back on?

Luigi Maroncelli

unread,
Apr 20, 2015, 4:38:38 AM4/20/15
to mod-pagesp...@googlegroups.com
Hi Shawn,
hoster said this error accured often... this is the last


Luigi Maroncelli

unread,
Apr 20, 2015, 4:39:06 AM4/20/15
to mod-pagesp...@googlegroups.com
Questa è l''ultima volta che è accaduto:

[Tue Apr 14 10:11:38 2015] [error] [mod_pagespeed 1.9.32.3-4448 @3747] [0414/101138:ERROR:in_place_resource_recorder.cc(225)] Empty resource in IPRO for URL http://www.info-alberghi.com/js/jquery.countdown.js Response headers: HTTP/1.0 200 (null)\r\nX-Accel-Version: 0.01\r\nX-Accel-Redirect: /internal-nginx-static-location/js/jquery.countdown.js\r\nCache-Control: public, max-age=31536000\r\nExpires: Wed, 13 Apr 2016 08:11:38 GMT\r\nVary: Accept-Encoding\r\nContent-Encoding: gzip\r\nX-Powered-By: PleskLin\r\nContent-Length: 20\r\nConnection: close\r\nContent-Type: text/javascript\r\nDate: Tue, 14 Apr 2015 08:11:38 GMT\r\n\r\n Request headers: GET  HTTP/1.0\r\nHost:www.info-alberghi.com\r\nX-Real-IP: 151.47.123.28\r\nX-Forwarded-For: 151.47.123.28\r\nX-Accel-Internal: /internal-nginx-static-location\r\nConnection: close\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0 (Linux; Android 4.4.2; it-it; SAMSUNG GT-I9505 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrom
 e/28.0.1500.94 Mobile Safari/537.36\r\nReferer: http://www.info-alberghi.com/mail_scheda_inviata_new.php\r\nAccept-Encoding: gzip,deflate,sdch\r\nCookie: Info_Alberghi_Cookie=Saluti+da+Info+Alberghi; __utmt=1; __utma=62232564.172942465.1428998924.1428998924.1428998924.1; __utmb=62232564.2.10.1428998924; __utmc=62232564; __utmz=62232564.1428998924.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); prefill=a%3A10%3A%7Bs%3A4%3A%22nome%22%3Bs%3A0%3A%22%22%3Bs%3A5%3A%22email%22%3Bs%3A20%3A%22marcanto04%40gmail.com%22%3Bs%3A6%3A%22arrivo%22%3Bs%3A10%3A%2225%2F07%2F2015%22%3Bs%3A8%3A%22partenza%22%3Bs%3A10%3A%2201%2F08%2F2015%22%3Bs%3A6%3A%22adulti%22%3Bs%3A1%3A%222%22%3Bs%3A7%3A%22bambini%22%3Bs%3A1%3A%221%22%3Bs%3A17%3A%22prefill_eta_array%22%3Ba%3A8%3A%7Bi%3A1%3Bs%3A1%3A%224%22%3Bi%3A2%3Bs%3A0%3A%22%22%3Bi%3A3%3Bs%3A0%3A%22%22%3Bi%3A4%3Bs%3A0%3A%22%22%3Bi%3A5%3Bs%3A0%3A%22%22%3Bi%3A6%3Bs%3A0%3A%22%22%3Bi%3A7%3Bs%3A0%3A%22%22%3Bi%3A8%3Bs%3A0%3A%22%22%3B%7D
 s%3A11%3A%22trattamento%22%3Bs%3A14%3A%22Mezza+pensione%22%3Bs%3A3%3A%22tel%22%3Bs%3A0%3A%22%22%3Bs%3A4%3A%22mess%22%3Bs%3A0%3A%22%22%3B%7D\r\nAccept-Language: it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4\r\n\r\n

Jeff Kaufman

unread,
Apr 20, 2015, 8:45:25 AM4/20/15
to mod-pagespeed-discuss
Thanks for sending this!  It looks like the key thing in this error is:

    X-Accel-Redirect: /internal-nginx-static-location/js/jquery.countdown.js

Your site is set up like this, right?

    [user] -> [nginx] -> [apache+mod_pagespeed]

What's happening is that apache is issuing a response like this:

   HTTP/1.0 200 (null)
   ...
   X-Accel-Redirect: /internal-nginx-static-location/js/jquery.countdown.js
   Cache-Control: public, max-age=31536000
   ...

   [empty response body]

Then nginx sees the X-Accel-Redirect header, and reads the relevant file off of disk to send out as the response body.

We can think of PageSpeed as sitting between nginx and apache, which means it sees this response before the response body is filled in.  The problem is, PageSpeed doesn't know it's seeing an incomplete response, so it saves a copy of the response body (empty) as it goes by and then later when it sees references to that file in the html it inlines it as an empty resource.

Thanks for helping us debug this!  For your site, and any other sites having this issue with 1.9.32.3 the best fix is to turn off IPRO:

    ModPagespeedInPlaceResourceOptimization off

In our next release we'll make sure to handle this case.  I think what we need to do is:
* Recognize that X-Accel-Redirect means a response is incomplete, and don't cache it.
* Look for other headers that mean this and blacklist them as well.
* In case there are any other headers used for this, don't cache any responses that have an empty body. 

Relevant doc:

Shawn Ligocki

unread,
Apr 20, 2015, 10:53:15 AM4/20/15
to mod-pagespeed-discuss
Thanks so much, Luigi, we think this has solved the mystery!

Luigi Maroncelli

unread,
May 5, 2015, 11:35:54 AM5/5/15
to mod-pagesp...@googlegroups.com
Thanks to you, I'm glad to be helpful. Good job.
...
Reply all
Reply to author
Forward
0 new messages