-1

I'm looking for a script/code that slows down the load time of a website. It might sound stupid but it's needed. I've tried with javascript...html codes.. .htaccess file and yeah.. I'm out of ideas. Im using a webshoes who's using "nginx". Anyone who has an idea? I feel very stupid now for asking. :P

So my goal is that when the client is hitting the enter key to visit example.com the website that shows up is going to simulate slow internet speed or something in that style. English is not my natvie language so I have a hard time to find the correct words to use..sorry for that.

Kjell
  • 1
  • 3
  • This is too broad, you need to be a little more specific with your question. – ccarpenter32 Aug 08 '18 at 19:04
  • For nginx, Are you looking for something like in echo module. https://www.nginx.com/resources/wiki/modules/echo `location /echo_after_sleep { echo_sleep 1.234; echo resumed!; }` – sothish Aug 09 '18 at 19:04

1 Answers1

0

Your question is so broad I can only give a broad answer.

Javascript would not be the best choice IMHO as it executes client-side. You IMPLY you want to slow things down on the server side.

You don't say which web server you're running and therefore which server-side scripting languages are available to you (e.g. php, C# via ASP.NET, etc.), but one thing you might try is figuring that out, then scripting a web page with built-in delays via functions such as the C# and php sleep() methods. This will cause the web server to pause as it generates the page.

Again, because your question is so broad, I can't give a more specific answer. My goal here is to point you toward something you can specifically do on the server side that we KNOW will slow things down.

The understanding here is that you are going to have a client hit the page that has the slowdown calls built in. If you're trying to do something more "nefarious", like simulating a stress test of the server by running it low on memory or CPU, those types of situations can slow down a server too, but are beyond the scope of this answer. You can Google stress testing tools; you'll want to have at least a basic grasp of system monitoring tools for your platform (Windows, Linux, etc.) as well if this is the path you're heading down.

markaaronky
  • 1,231
  • 12
  • 29
  • Oh sorry I forgot to have that info in my post. Im using a webhost who's using nginx. And the webpages are simple html files more or less. So I can't modify anything at the server but I have full access to the .htaccess file and all directories but thats it. Thanks for your answer though :) – Kjell Aug 08 '18 at 19:56