renatomarinho / laravel-page-speed

Package to optimize your site automatically which results in a 35%+ optimization
MIT License
2.4k stars 275 forks source link

Javascript no longer works with source URL #147

Open steinger opened 3 years ago

steinger commented 3 years ago

After upgrading to version 2.0.0, Javascript no longer works with source URL, for example Google Adsense

Original:

</footer>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</body>
</html>

laravel-page-speed 2.0.0:

</footer><script async src=</body></html>

Tested with different browsers.

joaorobertopb commented 3 years ago

ping @lucasMesquitaBorges

lucasMesquitaBorges commented 3 years ago

Thanks for reporting @steinger ! I'll check it

craftisan commented 3 years ago

I have the same issue. This happens for all inline scripts, where no src is present: Original:

<script type="text/javascript">

After:

<script async src=<script type=text/javascript>
wyamout commented 2 years ago

any fix for this issue?

souhailkaoussi-pro commented 1 year ago

I just removed the package, I couldn't get it fixed.

vsmartcode commented 1 year ago

I've seen this happen with srcs from external links, and specifically removing its "https://" doesn't cause the error anymore, but now the link won't work properly. I don't know if anyone has a solution to this problem.

souhailkaoussi-pro commented 1 year ago

To be honest with you, I just removed the entire package for my laravel app to work properly.