Hello everyone,
here is my question. I am using the fread function to read from file and then output the content to the browser. When outputing to the browser is it uploading from the server to the client or downloading from the client. Which is the limiting factor in the speed - ie. should the server have good upload speed or the client should have good download speed if i want the site to run fast? Sorry if it is a stupid question.Thanks
Fread - is it upload or download?
Moderator: General Moderators
Re: Fread - is it upload or download?
Downloading is generally considered information going from the server to the client, the the person browsing yoru site would be downloading the file you are feeding out.
To achieve fastest results, BOTH the "up" speed of the server (to the internet) and the "down" speed to the user from the internet should be as fast as they can. Speed will be based upon the slowest connection.
-Greg
To achieve fastest results, BOTH the "up" speed of the server (to the internet) and the "down" speed to the user from the internet should be as fast as they can. Speed will be based upon the slowest connection.
-Greg
Re: Fread - is it upload or download?
What i meant is that for example if i have a static file on the server, and the client accesses it directly then it is entirely up to the download speed of the client, isnt it? But in case of fread, does the server upload this content to the client thus using upload speed, or the client browser sees the fread content as something static and uses the download speed and reads from the RAM of the server?
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Fread - is it upload or download?
Direct access and using PHP to send a file using fread() both use the web server to deliver the the file. The direct way is probably a little faster because it is optimized.
(#10850)
Re: Fread - is it upload or download?
ok, thank you fellas