>
New Topic
>
Reply<
Esato Forum Index
>
General discussions >
Non mobile discussion
> Is there a web page over 500Kb?
Bookmark topic
Is there a web page over 500Kb? (html only, excluding images, flash, etc etc)
--
Posted: 2008-01-12 03:40:22
Edit :
Quote
I doubt it. 500kb is a lot of HTML code
--
Posted: 2008-01-12 09:57:58
Edit :
Quote
Why do you want to know?
--
Posted: 2008-01-12 16:32:07
Edit :
Quote
I'm currently developing an app with PHP and i want to know what's the maximum size of regular web pages, so i can set a limit to not downloading web pages but interested files.("content type" won't work cos for example metacafe server will send "text/plain" for "flv" files that obviously they aren't plain text)
--
Posted: 2008-01-12 16:57:18
Edit :
Quote
Well, i usually serve all my files through php so i can limit the speed. Works for very large files, like 200mb+. The problem is that php has a timeout limit of 30seconds, depending on your server configuration.
[ This Message was edited by: Johnex on 2008-01-13 13:59 ]
--
Posted: 2008-01-12 17:59:42
Edit :
Quote
It's not a good decision IMO. client can't use "resuming" feature cos web server can't send "Content-Range" header, unless you implement this feature directly in php script that is hard( and why we should do that when the web server already supports it). consider a client on a slow connection(for example firefox trying to download an image) if it can't completely download that image, it will send another request with "Range" header to download remainder bytes. if you pass your files with php, you force client to download that file from beginning, overwhelming server.
regarding timeout limit you can use: @set_time_limit(0);
if "safe mode" is off. if you can access php.ini, set "max_execution_time" appropriately.
my point wasn't to limit speed.
EDIT:
Additionally this approach will prevent "caching" mechanism. client will send "If-Modified-Since" and server can't create "304 Not Modified", although the file is untouched, and again overwhelming server with unnecessary requests.(and my browser should download that pic every time i visit this page, so remove that pic please :) )
[ This Message was edited by: sadeghi85 on 2008-01-12 23:01 ]
--
Posted: 2008-01-12 19:58:34
Edit :
Quote
Dude, i know all this, i have worked with php for 6 years. I gave that as an example, since you want a site to be sent with php.
--
Posted: 2008-01-13 14:58:59
Edit :
Quote
Well, my second post was confusing. let me explain my situation again. i want to use php as a client, since C++ is too complicated for me to use. my app is like a downloader. it searches a web page for links and download certain files. i want it to download all files except those that are plain text in nature. since "Content-Type" won't work, i need a size limit so if a file is bigger than that limit it can be considered as a binary file. till now a limit of 500Kb worked for me. biggest html file i saw was about 350Kb somewhere on mp3.com.
and i'm curious why you want to limit speed?
--
Posted: 2008-01-13 17:55:25
Edit :
Quote
Because you don't want 5 people downloading large files and maxing out the server connection and having the site run slower for everyone else just doing general browsing?
Just as an example.
--
Posted: 2008-01-13 18:35:41
Edit :
Quote
You could always write a little PHP string handing function to find the dot(s) and determine the filename's extension that way?
--
Posted: 2008-01-13 18:45:30
Edit :
Quote
New Topic
Reply