Asynchronous javascript
Autor: Nektarios K.
Visitado 1441,
Seguidores 1,
Compartilhado 0
Hi There,
I want to try the asynchronous javascript.
I saw the script should be like that
Where I have to write that script? At the home page preference - advance code?
Thanks
Publicado em
Hello. To apply Google's recommendations regarding website loading speed, you must have a PageSpeed Module on your hosting. https://magazin.aleksius.com/en/blog/31-website-x5-speed-optimization#speed-optimization - Read and watch a video about website optimization.
Hello,
If you write your code into the page_x proprerties / advanced tab, your code will be used ONLY for the page_x or page_y
Also you can write your code into the step 1 / Stats & Code / Code tab. In this case your code will be used for ALL pages into your website. It's a global usage.
Sometimes it's useful to put the JS script code into the global code for several different pages...
Hope this helps
Enjoy !
Axel
Autor
Dear Axel,
Thanks for the info. As I'm zero levels in code do you mean to add this code before closing the head tag?
Please check the attached screenshot
Thanks,
Nek
Hello Nek.
Yes it's the good place
if you need to add code, generally an HTML page is organized like:
<html>
<head>
<style>
here CSS code
</style>
<script>
here javascript code & funtions
</script>
</head>
</body>
here HTML code
</body>
</html>
Enjoy!
Axel
Autor
Dear Axel,
Kindly requested to check the attached screenshot.
Please let me know if is the correct way that.
As additional, I add some code bellow of I use to each page. If I can to use there is a better option to have it on each page?
What about the original file of jquery? I have to delete it or leave it?
Please advice.
Regards,
Nek
Nek,
I don't know what is this code. I give you a summury explanation on how too, but I cannot provide any support for external code. I am sorry for that.
I don't know the usage of the function (a,b) and the rest of the code. But I will say to leave this code in place.
My better suggestion before to integrate any code into WSX5 is to test it into an external & independent html file.
So when your external html file is ready, you can start to integrate it into WSX5, step by step
Enjoy !
Axel