Welcome to WebmasterWorld Guest from 54.235.46.164

Forum Moderators: incrediBILL

Message Too Old, No Replies

PDF file size guidelines?

Can anyone recommend any web PDF file size guidelines?

     
4:08 pm on Mar 13, 2008 (gmt 0)

New User

5+ Year Member

joined:Nov 29, 2006
posts: 19
votes: 0


Can anyone advise me on how to handle pdfs on a website? Any general industry guidelines to follow? I handle the administration of about 180 users that post to a content management system, and I need to develop a policy to require them to follow. I found this site that lists some guidelines that sounded pretty realistic.

[evergladesplan.org...]

File Size Guidelines:
< 1 mb (1000 kb) preferred
1-2 mb's ok for a really big file
3-4 mb's the maximum recommended for the web
5 mb's really too large for the web (should be split into smaller files or made available by request on cd).

Is this about right? Also, do you still have to include the file size next to the link and if so, should that be done no matter what the size, or only if large?

Thanks.

12:49 am on Mar 14, 2008 (gmt 0)

Full Member

5+ Year Member

joined:Mar 4, 2008
posts: 210
votes: 0


This is more art than science. I believe the issue is download time rather than file size -- but they are related of course.

I'd say that you should take a look at the sites that compute download time based on connection type. I'm sure you've seen them:

foo.pdf [1.5 M-bytes] - 4+ min. (dialup), 20 sec. (cable/DSL), 9 sec. (T1)
arf.pdf [5.4 M-bytes] - 15 min. (dialup), 1+ min. (cable/DSL), 30+ sec. (T1)

I'd use 6 k-bytes/sec. for dialup, 80 k-bytes/sec. for cable/DSL, and 170 k-bytes/sec. for T1 (or real DSL, but nobody sells real DSL). I'd be interested to see what other people think.

5:41 am on Mar 14, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


include the file size next to the link

It's a courtesy that I personally appreciate. I often hesitate to start downloading a file when I can't predict what I'm getting into (especially if I'm traveling and stuck on a slow connection.)

9:33 am on Mar 14, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


I believe the issue is download time rather than file size -- but they are related of course.

On capped (broadband) services file size can be more important - particulary towards the end of the month. Ok, so PDFs shouldn't be too big in this respect, but hey.

include the file size next to the link

Yes, agree.

For large (3+MB I would have said) it may be better to force a download rather than allow it to be opened in the browser - this may help reduce bandwidth if that is an issue? Just a thought?

9:32 am on Mar 16, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:June 26, 2004
posts:155
votes: 0


For large (3+MB I would have said) it may be better to force a download rather than allow it to be opened in the browser...

Interesting -- how does one force a download?
9:56 pm on Mar 16, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


Interesting -- how does one force a download?

You basically want to tell the browser that the type of this file is 'something else'. If the browser does not recognise the type of the file then it will prompt to download it - as it doesn't know how to 'open' it.

Server-side, you need to set the "Content-Type" and "Content-Disposition" headers (and may be "Content-Length" and others to effect caching etc.) when the file is requested. In PHP you can do something like:

header('Content-Type: application/octet-stream'); 
header('Content-Disposition: attachment; filename=downloaded_file_name.pdf');

then readfile() and return it to the client.

Or, you could set this in an Apache .htaccess file to force all files in a sub directory tree to be downloaded when requested:

ForceType application/octet-stream 
Header set Content-Disposition attachment

Depending on how this is implemented, the browser may still try to open the file if the browser ignores the Content-Type header and simply uses the file extension to determine the file type. And FF can be configured to do whatever you like with any file type of your choice. But most modern browsers should handle this OK.

Check out the readfile() page of the PHP manual [uk3.php.net] for more info.