JQuery and jQueryMobile or one?

It will be great if someone can suggest the weather or not use jQuery for a mobile web application for low bandwidth, you also need to know if jQuery and jQueryMobile are needed, or I can just use jQueryMobile for mobile web applications.

thanks

+4
source share
5 answers

jQuery Mobile is not a separate library. This requires jQuery http://jquerymobile.com/download/

Using these cdn mini links would be nice

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> 

And the jQuery Mobile team is constantly working on performance with almost every version.

enter image description here

And if you are more concerned about speed. Then jQuery Mobile separated the library from the modules, so you can use only what you need.

And soon jQuery Mobile will release a bootloader for this

Download builder: in the works

Now that weve separated most of the user interface widgets, we have set the stage for being a bootloader. This will allow you to create your own version of jQuery Mobile to include only those parts that you need. For example, you can simply use the main files to add Ajax-based navigation using pushState and use some touch events and other utilities with a very easy build (about 10 thousand). Or you can add to specific widgets of the user interface, such as form elements, watchlists, etc. to create an optimized assembly. They aimed at creating a loader launching the tool as part of the final 1.0 in one form or another. Worked on now for all plugins support this tool.

Until Download Builder is released, you can always go to Github and download the untied widget: https://github.com/jquery/jquery-mobile/tree/master/js

+6
source

jQuery Mobile is not a complete library, you will need jQuery 1.6.4.

jQuery Mobile is lightweight and you can get a smaller version that will be smaller in size. You should also look at using CDN for your library, for example:

 <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> 

Instead:

 <script src="jquery.mobile-1.0.1.min.js"></script> 

If you did not know, CDN means the content delivery network, that is, the JQ library is located in another place, for example, on a Google server or jQuery, and delivered to your application. Thus, if the user has already downloaded / used the library before while browsing other websites, they will not have to download the library again. The benefits of this are better caching and lower latency.

+2
source

I recently used jQuery mobile for a web application. If the application you are building is not extremely complex, this library is perfect for you. Read their documentation as a note, as they recommend using slightly different events for mobile / touch events (Example: vclick, not click).

+1
source
  • jQueryMobile 1.0.1 depends on jQuery 1.6.4
  • jQM offers a smaller version of the file for faster bootstrapping of the library.
  • 3G Connection boots fine with CDN Hosted Minified files IMHO
  • If your end use is on an edge connection, they should expect a slower IHMO boot time.
  • Additional information about jQM CDN, file size, etc.

Copy and paste the fragment for the files located on the CDN (recommended):

 <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> 
+1
source

If you need a low bandwidth version, use "Minified and Gzipped: jquery.mobile-1.0.1.min.js", it's only 24kb.

Also check out the online versions:

 <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> 

Thus, if the user has already downloaded scripts while browsing other sites, they will not have to download them again.

Also you need to include these 3 lines for moble. Full jQuery is not needed!

Good luck.

0
source

Source: https://habr.com/ru/post/1394726/


All Articles