This repository was archived by the owner on Apr 10, 2025. It is now read-only.
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
combine_javascript will kill defer_javascript's pagespeed_no_defer attribute #709
Closed
Description
What steps will reproduce the problem?
1. Set up modpagespeed with combine_javascript and defer_javascript
2. Create web site with two deferred tags right next to each other
3. load in browser
What is the expected output? What do you see instead?
Worst case: Two non-deferred script tags. Best case: One non-deferred script
tag with both scripts combined
What version of the product are you using (please check X-Mod-Pagespeed
header)?
1.5.27.3-beta
On what operating system?
Linux
Which version of nginx?
1.4.1
Source:
<script src="jquery-ui-1.9.1.custom.js"></script>
<script src="jquery.mobile.router-0.9-git.js"></script>
Compiled:
<script
pagespeed_orig_src="http://localhost:8080/jquery-ui-1.9.1.custom.js+jquery.mobil
e.router-0.9-git.js.pagespeed.jc.v2Qwm_pS4A.js" type="text/psajs"
orig_index="4"></script><script type="text/psajs"
orig_index="5">eval(mod_pagespeed_B6Z4zSmdrm);</script>
Source:
<script src="jquery-ui-1.9.1.custom.js" pagespeed_no_defer=""></script>
<script src="jquery.mobile.router-0.9-git.js" pagespeed_no_defer=""></script>
Compiled:
same as above (bug!)
As a workaround, one can cause a flush of the combiner:
Source:
<script src="jquery-ui-1.9.1.custom.js" pagespeed_no_defer=""></script>
<script></script>
<script src="jquery.mobile.router-0.9-git.js" pagespeed_no_defer=""></script>
Compiled:
<script src="jquery-ui-1.9.1.custom.js" pagespeed_no_defer=""></script>
<script type="text/psajs" orig_index="4"></script>
<script src="jquery.mobile.router-0.9-git.js" pagespeed_no_defer=""></script>
Original issue reported on code.google.com by robert.b...@goodpoint.de
on 28 May 2013 at 11:09