What's your biggest current challenge? Have your say in Community Polls along the right column.

Defer a non-asset file

Defer a non-asset file

Ayoub29
Tourist
13 0 1

Hello,
I want to defer third-party codes to improve my site speed, and I came across a few solutions but they all say to use this line <script src="{{ 'file.js' | asset_url }}" defer="defer"></script>. But what if the file I want to defer isn't in the assets file. I tried to defer the files that impact my site speed, and it gives me this message:

Ayoub29_0-1730632161018.png

So my question is, what should we replace "asset_url" with? since it doesn't exist in the assets folder?

 

Replies 0 (0)