Closed vaadin-bot closed 7 years ago
Originally by @Artur-
Atmosphere 2.0.0 will ship with a non-jquery javascript version as well as the jquery javascript. I'm not sure we want to make the jquery dependency "public" in this way to be able to switch to the non-jquery version at some point if it is smaller or turns out to be the one which is better maintained.
Originally by CodingFabian
Hi Artuhr, i strongly favor the JQuery Version. But currently the vaadinPush.js is 80% JQuery 1.7.2 Our plugins use JQuery 1.9.x.
So in fact jquery gets loaded twice and the one in vaadinPush.js is not cached.
So what I did, i ripped itour from vaadinPush.js, and load it via a bootsrap listener into the header:
// make sure jquery is already loaded, as we removed it from push js
head.append("<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\" type=\"text/javascript\"></script>");
by doing so i have a super cached jquery both my plugins and vaadinPush.js uses
Originally by CodingFabian
Our application uses jquery 1.9.1, which we pull from google cdn in minified version. Now with push a second version of jquery is loaded. It would be great if vaadin would offer a way so that I only load it once. Because vaadin push is loaded as very first script, I don't see a good way of preventing that. I could add it to the bootstrap page, but still the pushJs would load its own.
Imported from https://dev.vaadin.com/ issue #12198