Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Drew Templeton
6,509 PointsSimulate Loading Time When Developing Locally
Are there any methods to simulate loading time when you're developing a website locally using MAMP?
4 Answers
J.T. Gralka
20,126 PointsDrew,
It all depends on what you're interested in doing. Sometimes, I simulate load time by having PHP sort a large array of random integers. Depending on the size of the array and the sorting algorithm you're using it only takes around a second or two -- long enough to display some sort of feedback (e.g., loading text on a button, a scrolling gif image, a load bar, etc.) to the user. In theory the page hasn't finished loading until the sorting function is finished sorting the array.
This post provides some more practical advice for actually slowing down your web connection with your web server, but I don't know how well these sorts or services work for a local connection.
Perhaps somebody else has more practical advice on this issue. Perhaps you could shed some light onto what it is you're interested in testing. In any case, best of luck.
Cheers,
J.T.
James Barnett
39,199 PointsNot that I know of, but you can use the YSlow! extension with MAMP
Drew Templeton
6,509 PointsI'm really just looking to slow down the connection to something more realistic that the end user will be experiencing. Mainly for interface interactions on the site and such.
James Barnett
39,199 PointsThat's what dev servers are for
- Design site locally
- Profile page loading using YSlow!
- Upload site to a dev server
- Check YSlow! & http://loads.in against the dev server