Intentionally Slow Down HTML/PHP Page Load to Test

前端 未结 8 1376
别跟我提以往
别跟我提以往 2020-12-08 04:32

I\'m curious if there exists a method to intentionally slow the page load?

I\'m testing my HTML & PHP pages on my local host right now, and I want to see how my

相关标签:
8条回答
  • 2020-12-08 04:53

    You can use php's sleep($seconds) function to slow down a page load. However, you would need to turn implicit output buffer flushing to "on" with ob_implicit_flush(true); if you want anything to be sent to the user's browser before the page is done being processed. Otherwise your page won't have ANY contents until it's done loading. Calling sleep alone won't do the trick.

    0 讨论(0)
  • 2020-12-08 04:54

    Call sleep() in your PHP code to delay the request to the server.

    0 讨论(0)
提交回复
热议问题