QuickFix: Missing ASP.net Embedded Resource

Problem:

Missing ASP.net embedded resource on remote server, but not on local dev server.

Background:

We embed a JavaScript file as a resource in a DLL. This JavaScript file is exposed by webresource.axd.

Issue:

We found that the problem was related to a mismatch in the build date of the DLL and the time on the server. The build date is in the future compared to the server system date. Read more »

Yo! Check My Reflow

I remember when I first started getting into website performance optimization, the more I dug into it, the less I seemed to know. I remember hearing of browser repaint and not knowing what reflow is, and not realizing how important either of them really are in performance optimization. I definitely didn’t have many strategies in my toolbox to address issues with reflow. So, after reading a quick overview of reflow on Google Code, I decided to get up to speed on the subject.

I’m not going to go into a deep explanation, because the links below provide more than enough info to get you well versed on reflow. Basically, reflow is how a browser calculates the positioning or layout of elements. This may not be the best definition. So here is video of the process for those of you who are more visual.

Read more »

It’s More Than Where You Load JavaScript, but How

Well I know that JavaScript blocks anything else from downloading on the page. My strategy to lessen this effect has been to move JavaScript to the bottom of the page. After reading 12 Steps to Faster Web Pages with Visual Round Trip Analyzer, I have to question this strategy. It describes a technique for using JavaScript to write the external script tags.

function AsyncLoad()
{
    var l = arguments.length;

    for (var i=0;i<l;i++)
    {
        document.write("<script src='" + arguments[i] + "'></" + "script>");
    }
}

AsyncLoad("file1.js", "file2.js", "file3.js");

The article states that although moving external scripts to the bottom reduces their blocking effect, it doesn’t take advantage of the bandwidth available to get everything downloaded as soon as possible. So, loading files with a document.write allows them to be loaded outside of the JavaScript engine, hence no blocking by JavaScript. How is this so?

Well let’s take a trip deep into geek land and check into how browsers actually interact with external scripts. Reading through this Mozilla bug report (https://bugzilla.mozilla.org/show_bug.cgi?id=364315) and a few other sites, when the browser encounters a script tag that references an external script it will download the script. It will not allow parallel downloading of other assets until the script is done downloading and parsing. Don’t take this as gospel, because I haven’t looked at browser source code or anything. I am just interpreting what I have read from multiple sources. This bug report also suggest that the browser vendors are already attacking the blocking behavior so the technique I am describing here won’t be needed in newer browsers.

So, although async JavaScript loading doesn’t address the problem of HTTP requests, but it prevents those pesky JavaScript blockers from causing a traffic jam, allows other elements to download in parallel, and efficiently uses bandwidth.

Well I’m off to do some testing. If you haven’t played around with Visual Round Trip Analyzer, I will be blogging about it soon (if I have the time).

I hope you found this useful.

RTT Says the Client is not Alway Right

I have a team member experimenting with base64 encoding of images to reduce HTTP requests (that’s a mouthful). I’m not going to try to explain what this involves, but it isn’t as complex as it first sounds. You can get more info on base64 encoding on this blog post by James McCaffrey. One of the side effects of this technique is it increases file size. So, the question is, what’s better for the performance of your web pages, a few large files or many small ones? Since HTTP requests are costly and bandwidth is plentiful, I’ll take a few large files for $500 Alex.

Did you know it’s faster to download a few large files than it is to download multiple small files of the same cumulative size as the large files? How is that so? It’s because of our nemesis Round Trip Time or RTT for short. RTT is the measure of the time it takes for a TCP packages to be sent to a server in a client request and sent back to the client in a server response. If you look at Yahoo’s Best Practices for Speeding Up Your Website, many of the rules address reducing RTT.

The main problem with RTT is that there is a delay caused by network latency. The latency is compounded when a DNS lookup has to be performed. When every you can reduce DNS lookups you reduce RTT delay. So, requesting one file instead of many is a great strategy. Whether you base64 encode images into your CSS file, combine images to sprites, use caching to prevent unchanged assets from being requested, reduce the number of domain names requested, or you combine your JavaScript files to one file, anything you do to reduce RTT will improve the performance of your web pages.

There are still a lot of people out there that believe the way to improve performance is to first improve issues on the back end, optimize servers and server side code. Don’t be fooled, about 80% of the time used to download a page is affected client side in the browser. You can look at this easy to understand research from Yahoo’s UI team. Next time you look at a waterfall performance report, remember that if the little bar that represents the initial request and response from your server is small in comparison to the rest of the assets downloaded, forget about throwing servers and backend code optimization at your performance problem. Look at client side optimization and maybe even base64 encoding.

In website performance the client is probably not right. Fix the client and your site will not suffer from the effects of RTT delay.

I Feel the Need for Website Speed

We are working on a performance project at work. One of the marketing guys wrote a blog post for our customers that talked about improving website performance. There is a lot of talk about performance going on at the company. One of the drivers of this talk is the desire to satisfy visitors with a fast responsive website. Another reason to jump on the performance bandwagon is Google’s commitment to a faster internet and backing up the philosophy with a change to the page rank algorithm to add page speed as a factor in where your site sits in search results. Lastly, we just want to be competitive. Beating the performance of the competition is just another notch on the belt and another battle won in the fight for market share. So, to keep visitors happy, maintain top 10 in the Google SERP (search engine result page), and to stay competitive, our site has to be fast. Read more »

Standars Based Website Design Coming to a Browser Near You

I have been building websites for over 10 years now. It’s usually the same drill each time. Use a graphics editing program to design the site and cut and optimize the images. Use an HTML editor to script the site. View, test, and debug in a browser. Normally, I go back and forth between these apps until I achieve the desired results in the browser. Well it looks like all of this will all be done inside the browser soon. Being able to design and edit in the platform I’m targeting is huge to me. So, I am very excited by all of the innovation in this space. Read more »

I’m an Official Geek – ALT.NET Geek Code

RWS2-Big3
I have been following the ALT.NETers for a while and finally decided to make it official. I got my Geek Code from geek supreme Scott Hanselman’s blog and joined the ALT.NET community.
If you want to decode my code click it. You can learn more about ALT.NET at altnetpedia.com and on Scott’s blog. You can join the community at altdotnet.org. You don’t have to have a Geek Code to be a member, I just thought it was interesting way to define my development style.

A Lazy Man’s Time Manager – RescueTime

rescuetimeI have been looking for a time manager to help make my time at work more productive. The problem with most of them is it takes time to track your time. It’s always a hassle for me. Remembering to start and stop clocks, enter time and projects…I have never been able to do it consistently. Well I have found my time management savior in a service called RescueTime. What is RescueTime? Here is their official definition:

RescueTime is a software tool that allows businesses and individuals to understand exactly how they spend their time and attention– and helps them spend it more effectively.”

Well that doesn’t really give you the good stuff. Read more »

Google is Coming to a TV Near You

googletvMicrosoft tried, Apple tried, will Google TV deliver. If Google is as good with TV as it is with its other apps there’s nothing else to say. It will be awesome.

I love the fact that this is built around Google’s core competency, search. I have 200 television channels and I hate flipping through the on screen guide. With Google TV finding something interesting is as easy as your basic Google search. Read more »

Get a Free Oscar and Emmy Winning Video Editor, Lightworks

scr_lightworksLightworks, the same editor used on many large production movies that I’m sure you’ve heard of, is going open source. This means you will be able to use this award winning software for free. You can’t download it yet, but its coming and I’m in line. If you are into video editing and you aren’t on the list, what are you waiting for? Get in line!

Read more »