Jump to content

Speed Issues


Distortion
 Share

Recommended Posts

My website was loading fine on my localhost, but now I've uploaded it I found out that it is terribly slow. That is why I'd like to have some tips on how to speed up my website. So any tip is welcome :)What I'm trying to do is convert parts of my php code to Javascript, since I've been told that is much faster. I started on learning Javascript yesterday and I'm wondering which parts of php I should convert. Should I do everything in Javascript exept the queries?Last thing I want to ask is if the speed will go up much if I switch from free to paid hosting.

Link to comment
Share on other sites

JavaScript can appear to run faster than PHP, as it can be written to execute asynchronously to page loading, but apart from that you will find little performance difference. Also, most things are just better off run on the server-side.It is best to try and figure out exactly what is making your website slower. You can run benchmarks on your PHP scripts (e.g. by calling microtime() at the start and end of the code and comparing), but I bet most of the delay is simply in the transfer of the completed document between the server and your machine. You can use a tool such as Firebug for Firefox to view the loading times for various resources.Switching to a paid server may help, as they may have more bandwidth allocated for customers, or servers in better geographical locations.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...