Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Data URLs in CSS and JavaScript are broken after upgrading ngx_pagespeed from 1.6 to 1.7.30.2 #596

Closed
liluxdev opened this issue Jan 12, 2014 · 8 comments

Comments

@liluxdev
Copy link

I'm using your latest release 1.7.30.2.

Before i had 1.6.29.7-beta and all was working like a charm, but after this upgrade I got reports from many hosted websites.. some of them with css issues some others with javascript issues.

One example is that:

http://parliamodivino.com/cat

should look like:

http://parliamodivino.com/cat?ModPagespeed=off

If you inspect the elements, for instance the ".facebook" social icon on the right sidebar, you see that pagespeed is doing strange things in css rewriting:

.social-icons-special .facebook a {
background: rgba(0,0,0,.1) url(http://parliamodivino.com/cache,_template,_modal-1eabe7a6.css+cache,_templa…qv==0.1+cache,_template,_template-28620727.css.pagespeed.cc.-FvUm2xruw.css) 0 0 no-repeat;
background-position: 0 0!important;
}

a merged css file as a background??

That is originally (in the ModPagespeed=off version):

.social-icons-special .facebook a {
background: rgba(0, 0, 0, 0.1) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAACiklEQ…caHEKcNtwNMST+AskuNOG3FqWimaC9bEkZxfa/Y8IQYvwCF5eaw1/Gds0AAAAASUVORK5CYII=) 0 0 no-repeat;
background-position: 0 0 !important;
}

But this worked well in the 1.6 version.

Also I get randomically javascript "undefined variable" error with ngx_pagespeed 1.7 that disappears if i clean the pagespeed cache but re-appears when the site content changes without cleaning the pagespeed cache.

This is my pagespeed configuration:

pagespeed on;
pagespeed FileCachePath /path/to/pagespeed_cache/pdv;
pagespeed Domain *parliamodivino.com;
pagespeed LoadFromFileMatch "^https?://.*parliamodivino.com/"
                       "/path/to/vhost/pdv";

pagespeed LoadFromFileRuleMatch disallow .*; #for security
pagespeed LoadFromFileRuleMatch allow \.css$;
pagespeed LoadFromFileRuleMatch allow \.jpe?g$;
pagespeed LoadFromFileRuleMatch allow \.jpe?g\?t=[0-9]+$;
pagespeed LoadFromFileRuleMatch allow \.png$;
pagespeed LoadFromFileRuleMatch allow \.js$;
pagespeed LoadFromFileRuleMatch allow \.svg$;
pagespeed LoadFromFileRuleMatch allow \.ttf$;
pagespeed LoadFromFileRuleMatch allow \.woff$;
pagespeed LoadFromFileRuleMatch allow \.eot$;
pagespeed LoadFromFileRuleMatch disallow .*;  #for security

pagespeed Disallow *abstract*;
pagespeed Disallow *foundry*;
pagespeed RewriteLevel CoreFilters;
pagespeed EnableFilters collapse_whitespace,remove_comments;


#  Ensure requests for pagespeed optimized resources go to the pagespeed
#  handler and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
        access_log off;
        add_header "" "";
}
location ~ "^/ngx_pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }
location /ngx_pagespeed_global_statistics { allow 127.0.0.1; deny all; }
location /ngx_pagespeed_message { allow 127.0.0.1; deny all; }
location /pagespeed_console { allow 127.0.0.1; deny all; }

#end pagespeed

Maybe the issue is regarding the psol library, anyway I always used the binary psol matching the release number of ngx_pagespeed as suggested in your github README compile instructions.

@jeffkaufman
Copy link
Contributor

Thanks for the detailed bug report! This is fixed in mod_pagespeed trunk as of r3667, but we overlooked it when preparing the 1.7.30.2 patch release. We're going to need to get a new release out soon to fix this.

@liluxdev
Copy link
Author

Thanks!

@peterbowey
Copy link

Thanks 'jeffkaufman' , I noticed the same issue (above).

@huibaolin
Copy link
Contributor

Update the title to clarify the issue.

@nikolay
Copy link
Contributor

nikolay commented Jan 17, 2014

@jeffkaufman Does version 1.7.30.3-beta fix this?

@jeffkaufman
Copy link
Contributor

Yes.

@nikolay
Copy link
Contributor

nikolay commented Jan 17, 2014

@jeffkaufman Sorry, didn't see that. Thanks!

@liluxdev
Copy link
Author

I confirm, 1.7.30.3-beta fixes it. All is working well again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants