Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Slow down the browser [duplicate]

Tags:

javascript

I am working on a site that uses jQuery and has a fair amount of javascript that is run using $(document).ready(). On my dev machine everything runs great but it's a pretty powerful machine. I have had reports from people using older hardware of behavior that seems strange and I am fairly convinced that it is down to the time taken to process this initial javascript on slower machines.

Clearly, the solution is to sort out this initial javascript but it got me wondering - does anyone know of a way to slow down the execution speed of javascript in either Chrome or Firefox to be able to simulate these slower clients on my dev machine?

Cheers!

Update: Back when this question was posted, there weren't the same set of tools that there are today. At that time the VM option was the best option therefore I am leaving it as the accepted answer. However these days I would go straight for Chrome dev tools instead as suggested by Oded Niv

like image 848
Addsy Avatar asked Dec 15 '11 14:12

Addsy


2 Answers

This might not be the best solution, but something that could definetely work is to run a virtual machine, there you could specify all hardware specs as long as they are lower than you real machine. Look at this post

like image 23
isJustMe Avatar answered Nov 15 '22 09:11

isJustMe


Under Chrome developer tools -> Timeline you now an option to throttle down the CPU, look for the dropdown:

Chrome CPU throttling

UPDATE:

Chrome(ium) changed in new versions, it is now under the Performance tab, and you have to click the settings button in the corner for this feature to show up:

Chrome new CPU throttling

like image 97
Oded Niv Avatar answered Nov 15 '22 09:11

Oded Niv