Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange question, download time 1

Status
Not open for further replies.

magnus2

Programmer
Mar 8, 2004
23
SE
This might be a strange question but I wonder if there is an easy way to make the web page download time ... long. Can I put something like

Hold(...)

in the code? Can I accomplish this with ASP? Also - are there any settings which determines after how long the browser (IE) returns "operation timed out"?
 
You could pause it before the DL starts, pausing in the middle is not recommended. You could also use output buffering to build the page server side then flush the buffer to the browser

server.scripttimeout is the command to set the timeout limit (in seconds) for the script. default time is 90 sec
 
Thank you very much Bastienk for your help and time! I'm new to ASP som I'm not fully grasping what I must do. So far I have only used some cache control headers before the HTML. Is this then the same place where I should put the pausing? How should I write? Which command? If I also use the server.scripttimeout, should I put it here also? Thank you very much again!
 
Hi again! This seems to work wich I found in another thread:

<%
t=timer()
sec = 60 'Number of seconds to pause
while(t+sec > timer())
'do code
wend
%>

Should I put the server.scripttimeout in the beginning? How do I write? Thanx!
 
javascript has a great function called SetTimeout which basically halts the process for a set time.

<script langauge=javascript runat=server>
var delayamt = 1000; // 1 sec
setTimeout("SomeRealFunction",delayamt);
</script>

You change the SomeRealFunction to point at whatever you want to run next...like a subroutine or function and the pause will need to be time desired in seconds x 1000 (1000 millisenconds / second)

The server.scripttimeout just needs to be in the page. I prefer to add it near the top where all the other declarations are made

hth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top