I want to add my external js to footer without minifying to ONE file.
Closed this issue · 20 comments
Hi, i want to add my jquery core and jquery migrate external cdn url js's to footer without combined to ONE js file. How can i do this? Please help me.
like exclude jquery url's.
jquery
jquery migrate
other one js file.
Is there a reason that you need this? Ideally you should want to only have 1 JS file as it means less requests to the server. Currently the only way is to do data-no-minify="1"
on the script tag however you wish to accomplish that.
Will try. Because of jquery (external js) cdn is faster than my cdn. Will it work for this?
If jquery externally is faster, get a better CDN. I recommend using cloudflare free with a cdn subdomain proceed. No reason to use 3rd parties unneededly.
Jquery's cdn is faster beacuse of the people already loaded on other websites. Thats why im using. And my cdn is cdn77. Already using cloudflare.
beacuse of the people already loaded on other website
explain please?
If jquery externally is faster, get a better CDN.
For those using CloudFlare, please read up on CloudBleed
. You may have been affected. CloudFront, the CDN I use, was not affected by CloudBleed.
@JHabdas i personally never use their proxy, but a separate subdomain as to not process html. If not proxying the whole site then I dont see you being at risk for cloudbleed.
hi i really need this plugin without combine external js's so i want external js's as same. lots of website uses jquery cdn and when they came to my website no need to redownload jquery. please help me.
In my opinion it is still going to be faster to have your single bundle that you can control vs relying on a external CDN you don't. I dont see the logic that because others use a CDN with jquery that means if you use it, they will load faster, as that cuts out the ones that don't. You are better off getting your site on a CDN and things will load very fast regardless.
Single bundles are bloated. Typically with oodles of UMD wrappers, because they're built using Node the cajoled to work on the Web using Webcrap. I mean Webpack. And oftentimes with all sorts of stuff needed by a single page on a site the current page doesn't need. Or, if the page does need it, it has to wait for the entire payload to download, parse and execute. And that prevents simple lazyloading techniques which can dramatically inprove page performance.
Anyway. Even if you are bundling, it's still more efficient to load things over CDN unless your app scales horizontally (by clustering app instances behind a load balancer), especially vendor libs like jQuery.
But don't take it from me. I'm not here to give conjecture. Just do the testing yourself and you will see.
Hi also im using ads services (publishing adsense+other ads) via external js files. When i use this awesome plugin, ads doesnt show up because of combining everything to one file. How can i exclude externals on this plugin? Ads js's are top of the website source, ads js's are loading before main site elements. My website https://tosunkaya.com (just changed the theme)
First you need to understand: https://hackcabin.com/post/managing-async-dependencies-javascript/
My ads js's are already async but if you look to my website source, you can see ads codes on the above/top.
● Anyway can i exclude external js's like jquery js on this plugin?
● Jquery CDN (cdnjs by cloudflare) or my CDN (cdn77) static.tosunkaya.com
Unless it's specific to this plugin it should probably go to StackOverflow
Do you recommend my cdn (cdn77) over jquery's on cdnjs?
If you recommend i will load jquery from wordpress and use my cdn for jquery.
Use a3 lazy load with this plugin to lazy load ads too :). And yes, use your CDN for everything so you have control. Though pro tip: Use a sub domain on cloudflare (proxied) and get free CDN for life + wp-rocket integration.
@JHabdas who are you talking to with https://hackcabin.com/post/managing-async-dependencies-javascript/?
Thanks for everthing. I will do presently. I am already using cloudflare for all website with proxy.
You mean disable proxy for main domain and create a subdomain with proxy (dns thing), will work better than "as it is now"? But My CDN has more locations than Cloudflare.
Can i use this for "cookie free domains" also? I asked too thing, sorry for this :)
The cookie free domain things I tend to ignore. And CF has 102 DC's. I havent seen any cdn with that. And If you have CF proxying your whole domain, CDN77 is not needed. I just dont like using it on the whole site due to cloudbleed and other reasons, but thats just my opinion.
@JHabdas who are you talking to with https://hackcabin.com/post/managing-async-dependencies-javascript/?
Everyone