Refactoring is the art of reworking your code into a more simplified or efficient form in a disciplined way. Refactoring improves internal code structure without altering its external functionality by transforming functions and rethinking algorithms. Consequently, refactoring is an iterative process. By refactoring your JavaScript, Flash, and Java you can streamline its size, simplify your code, and speed up download and execution speed.
Speed optimization
Sink the Splash Pages – improve bailout rates, credibility, and rankings by removing splash page screen
Splash pages are branding or branching pages that usually appear before the main home page of a site. Many splash screens are graphically rich to entice users to explore the site. Unfortunately, splash pages decrease credibility, traffic, search engine rankings, and web site performance. This article explores the effects of splash pages and offers some solutions to lessen the pain.
Cut the Comments
Computer classes teach “structured programming” with well-commented code as one requirement of good programming practice. However, easily understood code doesn’t make for fast downloads on the Web. By cutting your comments you can shrink your XHTML, CSS, and JavaScript to download faster.
Convert Graphic Text to Styled Text – graphic text to css text conversion
Converting graphic text to styled text is an effective way to speed optimize your website. Graphic text is simply text that has been pixed in stone in a graphic design program like Photoshop. While graphic text allows you to use any font face (see Figure 1), it has a number of disadvantages.
Use Short Relative URLs – url abbreviation avoids long uri files and directories
Brevity is a good thing. Absolute, verbose URLs are out, relative short URLs are in. By carefully naming your files and directories, and judicious use of abbreviation with mod_rewrite and content negotiation with same, you can speed up your pages while maintaining legibility and search engine positioning.
Use Lowercase Markup For Better Compression – avoid uppercase markup to improve xhtml and html compression
Lowercase markup compresses more efficiently than uppercase markup. Along with the benefits of XHTML compatibility, lowercase markup allows HTTP compression to work more efficiently by increasing redundancy. In this article we show the benefits of using lowercase markup on five popular sites.
Use Conditional Server Side Includes – conditional css style sheets xssi
You can minimize HTTP requests by combining external CSS and JavaScript files. You can go even further by server-side including the remaining external files (with restrictions for XHTML due to its XML nature). One additional technique is to make those SSI work harder for you by serving up conditional content. Conditional server-side includes let you deliver different content based on environment variables sent by browsers to servers.
Remove Whitespace – whitespace removal optimizes html css javascript source code
You can safely remove most whitespace from your code with no change of appearance to your pages. Browsers don’t care how pretty your code it, they process the code between tags, real or implied. Formatting code with spaces, tabs, and returns makes it easy for humans to read, but slower for browsers to download.
Minimize HTTP Requests
By combining external files and optionally including CSS and JavaScript directly within your XHTML pages, you can minimize the number of HTTP requests required to render your page. Each unique HTTP request requires a round trip to a server, introducing indeterminate delays. Users attune to fast, consistent response times. The more HTTP requests that your pages require, the slower and less consistent their response time will be.