Top 10 Hosting > Web Hosting Articles
Improve website access speed, speed up the web hosting
1.Minimize HTTP Requests HTTP requests to reduce
Pictures, css, script, flash, etc. These will increase the number of http requests to
reduce the number of these elements can reduce the response time. The number of JS, CSS,
where possible, be included in the case of a file is written directly to the page where
image is not good practice, should be written into the CSS, the use of CSS sprites put
together the small map to locate after the use of background.
2.Use a Content Delivery Network CDN technology use
CDN really is a good thing, but the server of the service providers generally charge fees.
3.Add an Expires or a Cache-Control Header set expire header files or static cache
Browser will use the cache to reduce the number of http requests to speed up page loading
time, if the page head plus a long expiration time, the browser will cache the page where
the element has. But such things change if the page where the words would change the name,
otherwise the client will not take the initiative to refresh, this can be modified.
Htaccess file to achieve.
4.Gzip Components Gzip compression
Gzip format is a very common compression technology, almost all browsers have the ability
to extract the Gzip format, and its compression ratio can be very large, the general
compression rate of 85%.
5.Put Stylesheets at the Top to put at the top of CSS
Let visitors see the site as soon as possible the integrity of the style.
6.Put Scripts at the Bottom to place the bottom of the JS
Site would then be rendered functional set, of course, the JS to load your content does
not affect the performance of the process.
7.Avoid CSS Expressions Avoid CSS Expressions
CSS expressions are terrible, the only thing is the implementation of IE to support very
large computation times, you move your mouse but it has to be re-calculated, but sometimes
to do a compatible browser to use to the IE6.
8.Make JavaScript and CSS External JS and CSS to external links
Described above, the cache of this matter, some of the more common of the JS and CSS, we
can use the form outside the chain, for example, I was outside the chain, from Google to
the Jquery file, if my visitors to browse other use of this document outside the chain The
site has been downloaded and cached the file, then visit his website when I do not need to
download it!
Reduce DNS lookup 9.Reduce DNS Lookups
Is to reduce the site from external call resources, Google analyzes and picasa pictures of
foreign chains are considered in it.
10.Minify JavaScript and CSS reduces the size of JS and CSS
JS and CSS are all writing skills, with a minimum of code to achieve the same function,
reduce gaps and enhance logic, the way we use the abbreviation, of course, there are many
tools to help you achieve this.
11. Avoid Redirects to avoid redirection
Then write the link, although the "www. Today-s-ooxx. Com" and "www.
Today-s-ooxx. Com /" only a final "/" only a thin, but the results are
different, the server needs take the time to redirect the former and then jump to the
latter, this should be his attention, you can also use Alias or mod_rewrite in Apache or
DirectorySlash solution.
12. Remove Duplicate Scripts Remove duplicate scripts
Repeated calls to the code browser and does not identify overlooked, but will be
operational once again, this is certainly a big waste.
13. Configure ETags configuration ETags
14. Make Ajax Cacheable Ajax cache
Ajax is a real-time response, in the browser receives new data before the old data is
cached, so better able to improve efficiency.
15. Flush the Buffer Early release of the buffer as soon as possible
When the user requests the page, the server side need to spend 200 to 500 ms time to put
together HTML, will be written in between the head and body, release the buffer, so you
can file head is sent, and then re-send the file content, improve efficiency .
16. Use GET for AJAX Requests approach to AJAX requests with GET
Get interactive methods and only one server (sending data), while Post to twice (to send
the head and then send the data).
17. Post-load Components delay in loading components
The first load of the components must initialize the page, and then load the other, YUI
Image Loader is a good example.
18. Preload components pre-loaded component
Loaded in advance what the future may be used, and the delay load does not conflict with,
its purpose is to provide faster response to subsequent requests, see the Google home page
on the application of CSS sprites.
19. Reduce the Number of DOM Elements to reduce the number of DOM elements
Complex page structure means a longer download and response times, more reasonable and
more efficient use of tags to structure the page, is a prerequisite for a good front end.
20. Split Components Across Domains separation of components across domains
Page components from multiple sources can increase your parallel downloads, but do not get
too much more than 2-4 domains mentioned above will cause the DNS lookup to waste.
21. Minimize the Number of iframes to reduce the number iframe
Need for more effective use of ifames.
iframe advantages: good advertising, slow to download third-party content, security,
sandbox, parallel download script
iframe Disadvantages: there will be even larger for the air consumption of resources, will
prevent the page onload.
22. No 404s do not appear 404 pages
Where the site itself (non-search results) appears 404 page 404 page meaningless affect
the user experience and will consume server resources.
23. Reduce Cookie Size reduced Cookie
Cookie in the server and browser through the file header between the exchange and minimize
the Cookie volume, set a reasonable expiration time, to a good efficiency.
24. Use Cookie-free Domains for Components of the components using the domain name without
Cookie
Cookie read the static component is a waste, to use another domain name without Cookie to
store your static component of a good way, or you can only store in the Cookie domain with
www.
25. Minimize DOM Access DOM reduced the number of visits
JS DOM access is very slow, try not to use JS to set the page layout.
26. Develop Smart Event Handlers development of flexible event handlers
DOM tree, adding too many elements are event handlers, then, the reaction efficiency will
definitely be lower, YUI has a onAvailable event tools can help you set up a flexible
handle DOM events
27. Choose
over @ import use
Instead of @ import
In IE, use the @ import to and used in the bottom of the page
Like, we should
Put at the top.
28. Avoid Filters to avoid the use of filters
If Alpha transparent, do not use the Alpha Image Loader, it is inefficient and only the
version for IE6 and below, with PNG8 picture. If you must use, plus more than _filter to
affect IE7 users.
29. Optimize Images optimize image
To PNG8 your GIF will be a good way to reduce the volume, there were many ways to tackle
your JPG and PNG image in order to achieve optimal results.
30. Optimize CSS Sprites optimized CSS Sprites
In the CSS Sprites in the vertical and the arrangement of images as compact as possible to
the color similarity of images arranged together, will reduce the image size and increase
its page image display speed.
31. Don't Scale Images in HTML not in the zoom image in HTML
What's the use of pictures to use much, 1000X1000 image is width = "100" height
= "100" after its KB number is not reduced.
32. Make favicon. Ico Small and Cacheable narrow favicon. Ico size and cache it. ICO
browser site should not always change it, then the cache is long, and the best control in
1K less.
33. Keep Components under 25K to ensure the following components in the 25K.
iPhone can not cache more than 25K of components, and this is to be compressed before.
34. Pack Components into a Multipart Document will be packaged into a multi-component part
of the document, just like adding attachments in the message as an HTTP request is enough,
but the technology needs to ensure agency support, iPhone does not support.
How to choose web hosting service provider? How to choose a web hosting?Improve the Performance of Web HostingTop 6 Hosting Comparison