1

I'm trying to figure out if it is possible to configure a webserver so that requests for files will be served with a delay. So for example if i were to serve this file http://www.example.url/picture.jpg, i want the data transfer to start only 2 seconds after the request has been made... or any other arbitrary number. Now i'm a complete noob to this kind of stuff, all i know is that the htaccess file is what i'm expected to use to do any configuration type like things. Is there a way to make this happen somehow?

Any help would be greatly appreciated.

1 Answer 1

1

I am not sure if this can be done directly in htaccess, but how about doing it on the webpage itself, via a meta?

<meta http-equiv="refresh" content="3;URL='http://www.example.com/mypicture.jpg'" />

if you need to use htaccess, you could add this image page to page2.html, then in htaccess redirect to it like this

Redirect 302 mypicture.jpg http://page2.html

I have not tested this, but I think it might work

8
  • I forgot to mention, but its not for use with a website. I need to specifically configure it on the server side, if possible at all of course... Mar 12, 2014 at 14:40
  • 1
    could you maybe make a little perl script, that you run, and add the delay there, before it start the download?
    – Sverre
    Mar 12, 2014 at 14:44
  • I don't know, would this be independent from how the file is accessed? I have no experience with perl but i'm willing to figure it out if that would offer a solution. Mar 12, 2014 at 14:58
  • 1
    This solution would be independent from access method. The same effect can be achieved with PHP or any other language used on a server. Mar 12, 2014 at 15:00
  • Ok thats good to know, how do i get started? I figure it wouldn't be too much of an effort to put something like this together i think? Mar 12, 2014 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .