Some of developers met many problems before, during and after development web application. One of problems that they met after development web application is their web application bad performance. There are a few methods to increase web app performance better is listed below:
1. Application Cache
HTML5 introduces application cache, which means that a web application is cached, and accessible without an internet connection.
Application cache gives an application three advantages:
Offline browsing - users can use the application when they're offline
Speed - cached resources load faster
Reduced server load - the browser will only download updated/changed resources from the server
USE:
<html manifest="minify.appcache">
CACHE MANIFEST (this one is required as it say that file is a cache)
/theme.css
/logo.gif
/main.js
2. Ajax cache
USE:
$.ajaxSetup( {
cache: true,
data: null,
beforeSend: function (xhr) {
xhr.setRequestHeader('Authorization', "Basic password=");
}
});
cache = true
It means that every scripts of yours need to be cached also help for fast performance and if you want to get rid of them you need to clear cache.
Note: appcache is cache resource but Ajax set up cache is cached JavaScript.
3. Write code in standard
Your code should be standard one such as in HTML, CSS and JavaScript code. Every developers have different coding style but you make sure your code is standard.
4. Review your logic
Sometime your logic is bad solution and take long time execute. You can check again and again to find better solution to solve your problem. So its performance will be better.
5. Compress assets using in your web app
Some assets you are using should be compressed. It will load better in your web app according to its size.
6. Clean your code
All above methods you should use in your web development. It will help your web performance better.
If you have any comment and idea that you want to share, you can comment in our post.
Related post: How to create Virtual Host in Apache
No comments:
Post a Comment