Last months I use JavaScript very intensively and found a very convenient and efficient approache that I did not read about.
You can see many Javascript libraries around, at least 3 of them are well-established and popular:
Prototype (with script.aculo.us), Yahoo! User Interface Library and a Google Web Toolkit.
I personally don't like to watch a progress bar while those bells&whistles of a web 2.0 site are loading. The only way to save visitors of your site from a tedious waiting is to count the size of your web applications and place efforts to minimize it.
Here are my ideas on how to achieve great effects on the site, save bandwidth and development time.
* One idea I found to be very efficient is that one library is not enough.
Good results can be achieved when using Prototype as a base helper library and the DOM Tooltip to draw menus.
Developer can combine best parts of different libraries to achieve better resulsts.
For example, I like YahooUI for it's great ready-made animation effects.
But for AJAX, DOM, Events and general DHTML development I prefer Prototype 1.4
Yes, Yahoo library has means to process AJAX and events, and script.aculo.us has many great features, but I like them less them.
* Second idea - JavaScript can be optimized before publishing.
Consider processing your .js files with a tool like JSMIN before uploading to the production server.
The first advantage - file size is reduced by 15-30%, and prototype 1.4 becomes 35 Kb instead of initial 47 Kb.
Second advantage - you can format your code, write full detailed comments, and not suffer from filesize penalty.
Unfortunately, not all javascript code keeps working after being optimized by JSMIN, so check first.
* Third idea is to take HTTP into account.
Developer can foresee and utilize caching abilities of the browsers.
One can also try to foresee the utilization of the keep-alive connections.
If you place a relative URL to the library - there is a chance it will be loaded in the same keep-alive connection with another HTTP request.
If you have subdomnains, you can use an absolute URL and the cached pre-loaded library will be immediately available on the pages of the subdomains.
To be continued! There is so much to write about AJAX :)
2 comments:
Chúng tôi cung cấp các dịch vụ vận chuyển gửi hàng từ nước ngoài về VN và ngược lại như Dịch vụ vận chuyển gửi hàng từ Việt Nam đi Pháp, ship hàng từ úc về việt nam, mua hàng Pháp, mua hàng Trung Quốc, Dịch vụ vận chuyển gửi hàng từ Việt Nam đi Úc... Hầu như ở mỗi nước chúng tôi đều cung cấp 2 dịch là chuyển về và chuyển đi. Có thể lấy ví dụ như ở Anh. Chúng tôi có dịch vụ gửi hàng đi Anh và mua hàng Anh. Ngoài chúng tôi còn phục vụ mua hang my và vận chuyển hàng đi mỹ giá rẻ. Để biết thêm chi tiết hãy liên hệ với chúng tôi nhé.
Mua hàng trên Amazon tại TP HCM được HangMyShipNhanh hỗ trợ mua hàng và ship về TP HCM với thời gian nhanh nhất, rẻ nhất, uy tín nhất, an toàn nhất.
1. Thời gian nhanh nhất:
Chúng tôi cam kết hàng từ Mỹ về VN nhanh nhất được hỗ trợ TP HCM.
-Thời gian mua hàng chỉ từ: 1-2 tuần thì quý khách đã nhận được hàng tại nhà của quý khách hàng.
hangmyshipnhanh.com
HangMyShipNhanh
2. Giá rẻ nhất tại TP HCM:
– Chúng tôi hỗ trợ tất cả các mặt hàng chỉ 3$/LBS – 4,5$/LBS
– Hỗ trợ tìm những món hàng có giá rẻ và chất lượng cho quý khách lựa chọn nhằm tiết kiệm chi phí mua hàng.
mua hàng
chuyên mua hàng giá rẻ
3. Uy tín – An toàn:
Chúng tôi luôn luôn đặt chữ tín làm kim chỉ nam để làm việc, với mục tiêu khách hàng hài lòng đó là niềm vui của Chúng tôi, Chúng tôi rất hân hạnh phục vụ quý khách!
Với mục tiêu nhằm nâng cao chất lượng và mang dịch vụ đến tất cả các khách hàng tại TP HCM và các vùng tại Việt Nam. Hỗ trợ mua hàng trên Amazon với gía rẻ nhất tại HMSN.
Cảm ơn quý khách hàng đã quan tâm!
Post a Comment