Everyone knows how frustrating it is when you visit an incredibly slow website. Watching the bar jump in tiny steps or the cog spin round endlessly is enough to make anyone go mad. Here are 5 ways to speed up your code, for a better end user experience.
1. Compress your images.
When using the "Save for Web" tool in Photoshop, you can compress our images in order to lower the file sizes. Now normally that's enough for anyone, but if you want the ultimate efficiency, a site named Smush.It makes your images ultra tiny without taking any quality with it.
2. Move script tags to the bottom
Content here... <script type="text/javascript" src="someScript.js"></script> <script type="text/javascript" src="anotherScript.js"></script> </body>
Moving the scripts down to the bottom of the page means that your form, content and images can all load before you start adding in the fancy effects or implementations. This is especially useful if for instance you're using a twitter badge to give your site you're twitter updates, but twitter is down. Having the code at the bottom of the page, means that all of your content can load first, rather than twitter timing out, then your content loading (making the page load very slow)
3. Link your scripts from Google
Not too long ago, Google began hosting scripts such as jQuery. There is one main upside to this:
Caching: Let's imagine that one user visits 10 sites that all link to Google's CDN, the user would only download jQuery once. this is because a browser can tell if a file is modified or not and can choose to load it, or in this case, not have to.
Compress your CSS and JS
Compressing your CSS and JS files can make that tiny bit of difference and can speed your website up quite a bit. Here are some tools to get started.
Javascript Compression Services
CSS Compression Services
4. While creating, learn keyboard shortcuts

Now this may sound straightforward, but I know personally how frustrating it is to have to go three of four menus to get to a very simple function, only to realise when you've got there, there is a keyboard shortcut for it. Learn them. If a function doesn't have a keyboard shortcut, and you have a Mac, you can create you're own by going to Keyboard Shortcuts in System Preferences. Now I don't know if this is possible in Windows, but if it is, please do leave a comment so I can add it into the article, (I hate to leave out people because of their OS.) After creating a keyboard shortcut, make sure you actually use it. Time after time, I've created them and completely forget that I have. When you go to the menu item again, make sure you use the keyboard shortcut and think about it every time you do. Eventually it'll become second nature and you'll be flying through the menus with ease.
5. Finally, don't use tables.
Let me first explain what a table is for. A table is for laying out tabular data, not a while site. If you want a table of content, use tables. (pretty obvious) If you want a whole site layout, use CSS and Div tags. There are many reasons, but one relates to speed, Nested Tables load more slowly. The most common way to create fancy layouts with tables is to "nest" tables. This means that one (or more) table is placed inside another. The more tables that are nested, the longer it will take for the Web browser to render the Web page. In Internet Explorer, this results in images and text bouncing around on the screen until they figure out where to place them. And in Netscape 4, the page won't display at all.












Hate those damn slow sites, ohhh wait…. Mine is kinda slow (well I hate myself then!)