I've been developing my own websites for a while, earning money by selling virtual items within games. Recetly I just got hired as a developer for the first time.
I've making minigames for them, and I've already agreed on a $50/game flat rate with them. This is fine.
However we're also looking at having me re-code their HTML to not make use of bulky frameworks (their site currently takes almost 30 seconds on the first load!). The trouble is, I have absolutely no idea what to charge for this work. Can anyone give me a general idea of what is normal for a web developer to charge, and in what unit? Is it done by page, per hour, or what?
There is no simple answer to this. It depends on:
It could be $5 p/hour, it could be $200 p/hour.
Maybe focus on what would be a rate you are happy with. If you get paid a rate you are happy with, then things are good right? So ask for that and see how you go.
In my opinion, if you can successfully perform web optimization tasks like your client is requesting, you are beyond the capabilities of a lot of junior and mid level web guys on the east cost in the US.
Additionally if their website is an ecommerce site or any type of revenue generating website, the performance gains you get them will likely drive a huge revenue increase for them.
Depending on your relationship with your client, and your time contention, I'd ask for $75-$125/hr, but like Joel said there are a ton of situational points to consider. If you are unsure of you're ability to make the performance improvements required you could see if they are open to a pay for performance deal. For example maybe you offer to do the work for free and if you get the page load/interactive time down to X number of seconds they offer you Y % of the revenue increase for 3 months or something like that. Depending on their business this code be a highly lucrative option for you, and will remove all risk for them.