я имею mod_pagespeed установлен для апаш и для 1 веб-сайта я включил его с помощью .Htaccess. Ниже приведен код .htaccess:
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters combine_javascript
ModPagespeedEnableFilters collapse_whitespace,elide_attributes
</IfModule>
Хотя комбайн JS написан. Он не объединяет все JS в один файл и отображает его в одном теге скрипта. Ниже приведен скрипт, загруженный после применения скорости страницы:
<script src="https://abcd.com/assets/js/jquery.min.js,qv=45.3.68.pagespeed.jm.g-Rqg9FLCg.js" type="application/javascript"></script> <!-- jQuery library -->
<script type='application/javascript' src="https://abcd.com/assets/js/jquery-ui.min.js,qv=45.3.68.pagespeed.jm.2Zsi-Z0kKK.js"></script>
<!--<script type='application/javascript' src='//apis.google.com/js/client.js'></script>-->
<script src="https://abcd.com/assets/js/vvv.min.js,qv=45.3.68.pagespeed.jm.OArlW9Bphb.js" type="application/javascript"></script>
<script src="https://abcd.com/assets/allcityname.js,qv=45.3.68.pagespeed.jm.JXiJKJxgSu.js" type="application/javascript"></script>
<script src="https://abcd.com/assets/js/main.min.js?v=45.3.68" type="application/javascript"></script>
<script src="https://abcd.com/assets/js,_resize.min.js,qv==45.3.68+slick,_slick.min.js,qv==45.3.68+js,_bootstrap.min.js,qv==45.3.68+js,_jquery.lazyload.min.js,qv==45.3.68.pagespeed.jc.pvjzSa2SoT.js"></script><script>eval(mod_pagespeed_Qji7kQ8WQd);</script>
<script>eval(mod_pagespeed_8xEMAs4Z6t);</script>
<script>eval(mod_pagespeed_Xkz2mXB8$v);</script>
<script>eval(mod_pagespeed_dGnDIMpPX7);</script>
<script src="https://abcd.com/assets/js/jquery.history.min.js+jquery.mCustomScrollbar.concat.min.js.pagespeed.jc.kZ5nzlQvQy.js"></script><script>eval(mod_pagespeed_RoTwDjZDVk);</script>
<script>eval(mod_pagespeed_V826YrUaHB);</script>
<!-- Jplayer -->
<script src="https://abcd.com/assets/js/jquery.jplayer.min.js+jplayer.playlist.min.js.pagespeed.jc.7pI28NzBCM.js"></script><script>eval(mod_pagespeed_XRZZeeTqUR);</script>
Вот скрипт без реализации скорости страницы.
<script src="https://abcd.com/assets/js/jquery.min.js?v=45.3.68" type="application/javascript"></script> <!-- jQuery library -->
<script type='application/javascript' src="https://abcd.com/assets/js/jquery-ui.min.js?v=45.3.68"></script>
<!--<script type='application/javascript' src='//apis.google.com/js/client.js'></script>-->
<script src="https://abcd.com/assets/js/vvv.min.js?v=45.3.68" type="application/javascript"></script>
<script src="https://abcd.com/assets/allcityname.js?v=45.3.68" type="application/javascript"></script>
<script src="https://abcd.com/assets/js/main.min.js?v=45.3.68" type="application/javascript"></script>
<script src="https://abcd.com/assets/js/resize.min.js?v=45.3.68" type="application/javascript"></script>
<script type="application/javascript" src="https://abcd.com/assets/slick/slick.min.js?v=45.3.68"></script>
<script type="application/javascript" src="https://abcd.com/assets/js/bootstrap.min.js?v=45.3.68"></script>
<script type="application/javascript" src="https://abcd.com/assets/js/jquery.lazyload.min.js?v=45.3.68"></script>
<script type="application/javascript" src="https://abcd.com/assets/js/jquery.history.min.js"></script>
<script type='application/javascript' src="https://abcd.com/assets/js/jquery.mCustomScrollbar.concat.min.js"></script>
<!-- Jplayer -->
<script type="application/javascript" src="https://abcd.com/assets/js/jquery.jplayer.min.js"></script>
<script type="application/javascript" src="https://abcd.com/assets/js/jplayer.playlist.min.js"></script>
Что не так?
Задача ещё не решена.
Других решений пока нет …