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

mod_pagespeed removes external (third party cdn) javascript resources #292

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Install mod_pagespeed (0.9.16.9-576) on 64bit Ubuntu 10.04 LTS running 
Apache2
2. Use default mod_pagespeed configuration
3. Make pagespeed rewrite a page having <script type="text/javascript" 
src="link-to-external-resource.js"> in the <head> section

What is the expected output? What do you see instead?
Expected output was untouched <script> tags with link to external js files. 
Instead the <script> tags simply removed.

What version of the product are you using (please check X-Mod-Pagespeed
header)?
0.9.16.9-576

On what operating system?
Ubuntu 10.04 LTS

Which version of Apache?
Server version: Apache/2.2.14 (Ubuntu)
Server built: Nov 18 2010 21:20:56 

Which MPM?
Don't know, whatever is default.

Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.

Stackoverflow: 
http://stackoverflow.com/questions/5976645/mod-pagespeed-removes-external-third-
party-cdn-js-resources

After some snooping around, I concluded with that the following filtes causes 
the issue:

combine_css
inline_css

What i did was that i enabled one filter at a time until i got the "error".

Also attached html before and after responses

Original issue reported on code.google.com by kei...@gmail.com on 13 May 2011 at 8:15

Attachments:

@GoogleCodeExporter
Copy link
Author

Somehow i thought this issue only affected external resources, but it seems 
local resources also is removed when looking at mod_pagespeed.txt

Original comment by kei...@gmail.com on 13 May 2011 at 8:21

@GoogleCodeExporter
Copy link
Author

There are 4 problems here that are contriving to break this example:

1. You claim the doc is XHTML via
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2. You don't close the link-tags on lines 9-12
3. mod_pagespeed 0.9.16.9 believed the XHTML tag implies balanced tags
4. mod_pagespeed should be more pessimistic in the presence of unbalanced tags.

Fixing any one of these 4 problems will resolve this.  Problems 3 & 4 are fixed 
in 0.9.17.3, which is available in source-code form but not yet as a binary.  
We're in the process of releasing this.

Original comment by jmara...@google.com on 13 May 2011 at 1:16

  • Changed state: Duplicate

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

No branches or pull requests

1 participant