WebSite X5Help Center

 
Nektarios K.
Nektarios K.
User

Html code for deferring js file  en

Autor: Nektarios K.
Visitado 868, Followers 1, Compartido 0  

hi there

I was trying to understand how I can deferring some js files.
In a vary.com/tools i found the code placed in my HTML just before the tag
I use both the option with connected and without a connected file (you can see my remark in a photo)
but the results are the same google and another tester still shows me the specific js file need to defer.
Kindly request your advice to this way of I follow and defer the js file

Thanks, and Regards

Nek

https://www.mieconsultancy.com

Publicado en
3 RESPUESTAS
Aleksej H.
Aleksej H.
Moderator

Hello.When I needed to implement what you want, as well as other optimization methods, I used the PageSpeed Module module on my hosting.

The module allows:

  • Combine all JavaScript into one file.
  • Combine all CSS styles in one file.
  • Move CSS styles before JavaScript scripts.
  • Preliminary rezolving of DNS.
  • Minimize JavaScript.
  • Minimize CSS.
  • Optimize the CSS in style attribute.
  • Deferred loading of images.Combine gaps. 
  • Move CSS to a head.
  • Remove unnecessary quotation marks.
  • Move small external CSS to HTML.
  • Move small external JavaScript into HTML.
  • Optimize URL in href and src attributes.
  • Coordinate META tags with HTTP headers.
  • Enable caching of images.
  • Enable caching of JavaScript.
  • Enable caching of CSS.

and other possibilities ...

More information is available here.

Leer más
Publicado en de Aleksej H.
Nektarios K.
Nektarios K.
User
Autor

Dear Aleksj,

Unfortunately, my provider does not support the speed module and I looking for an alternative method for deferring some js and css if possible.

Any possibility of that?

Rgds,

Nek

Leer más
Publicado en de Nektarios K.
Incomedia
Stefano G.
Incomedia

Hello Nektarios

Unfortunately, such codes go beyond the scope of what the Official support can help you with

For matters such as these, you will need to wait for other users to join the conversation and eventually help you out with this

I will however remain available should you have any further questions about the software

Thank you

Stefano

Leer más
Publicado en de Stefano G.