How to Simulate Long HTTP Requests
It happens less frequently these days but there are times when we need to accommodate for a HTTP request timing out. The service could be down, under heavy traffic, or just poorly coded, or any host of other issues.
Whenever I need to simulate a long HTTP request, I use a bit of PHP to make it happen:
// Don't resolve this request for 5 seconds
// A generic response
echo 'This is the response!';
// ... or hit a URL to make the case more realistic
With that script created, I make PHP start a server so I can make the request locally:
php -S localhost:8000
Now I can hit
http://localhost:8000 and get the long request I want!
There are a number of ways you can accomplish these long form requests but this has always been a favorite of mine!
Chances are that any Web designers using our Ghostlab browser testing app, which allows seamless testing across all devices simultaneously, will have worked with responsive design in some shape or form. And as today's websites and devices become ever more varied, a plethora of responsive images...
A few months ago, Chris Coyier shared his favorite CodePen demos right here on David's blog. A while back David asked me to share some of my favorite pens too, so here are some of the demos that have blown my mind in the past...
Honesty hour confession: file uploading within the web browser sucks. It just does. Like the ugly SELECT element, the file input is almost unstylable and looks different on different platforms. Add to those criticism the fact that we're all used to drag and drop operations...