homepage Welcome to WebmasterWorld Guest from 54.145.183.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
PDF file size guidelines?
Can anyone recommend any web PDF file size guidelines?
lilydale

5+ Year Member



 
Msg#: 3599633 posted 4:08 pm on Mar 13, 2008 (gmt 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.

 

MarkFilipak

5+ Year Member



 
Msg#: 3599633 posted 12:49 am on Mar 14, 2008 (gmt 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.

tedster

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



 
Msg#: 3599633 posted 5:41 am on Mar 14, 2008 (gmt 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.)

penders

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



 
Msg#: 3599633 posted 9:33 am on Mar 14, 2008 (gmt 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?

directrix

10+ Year Member



 
Msg#: 3599633 posted 9:32 am on Mar 16, 2008 (gmt 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?

penders

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



 
Msg#: 3599633 posted 9:56 pm on Mar 16, 2008 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved