7

I'm creating a page which has a number of images. While the images are loading I want to display a loading gif in place of the image. The trouble is, because I'm testing it locally the images all load immediately so I can't see the image loader that I'm trying to implement. Is there a way to simulate the slower image loading that you would get on a public website? I'm using c# and jquery

Matt
  • 215
  • 1
  • 11
  • [Fiddler](https://www.telerik.com/fiddler) can do [this for you](https://stackoverflow.com/questions/16276669/simulate-network-speeds-using-fiddler) – Liam May 24 '18 at 15:50

2 Answers2

15

If you don't want the entire site/page to load slowly but would rather have just the image delayed, you could use a service like deelay.me

Usage:

http://www.deelay.me/{delay_time_in_ms}/{full_url_to_img}

Example

http://www.deelay.me/3000/http://placehold.it/300x500
codescribblr
  • 1,146
  • 2
  • 11
  • 29
  • I need https and it seems https://deelay.me/ does not work. – TinyTiger Dec 10 '22 at 03:15
  • This is an open source resource. You can spin up your own server to do this testing and setup a valid ssl certificate if you need it over https. https://github.com/biesiad/deelay – codescribblr Dec 10 '22 at 16:58
7

While developing webpages (whatever technology), it's very useful to use a developer tool like Chrome developper tool for multiple purpose.

With it, you can do what you want : simulate slow network connection.

See 'Emulate slow network connections' part of the official documentation : https://developers.google.com/web/tools/chrome-devtools/network-performance/network-conditions

I think you can add a custom network throttling profile and set a very low download like 1kb/s

Chris
  • 234
  • 3
  • 16