I know I can't serve a PDF file, and update a web page at the same time, so...

Giganews Newsgroups
Subject: I know I can't serve a PDF file, and update a web page at the same time, so...
Posted by:  Scott Bryce (sbry…@scottbryce.com)
Date: Thu, 17 Jan 2013

I am building a site for a client of mine. He wants to be able to upload
files for his customers to download. Each customer can only view their
own documents, so these documents are placed in a directory specific to
the customer above the document root. The customer has to log in to
access the documents. He can go to a page where the documents in his
directory are listed. When he clicks on a document name, a script on the
server delivers the document.

Simple enough, except that the client wants two things. 1) At the top of
the page he wants a total count of the number of unread documents in the
customer's directory (Unread means the download link has not been
clicked). 2) He wants each document marked 'Read' or 'Unread.'

Fair enough, except that when a document is delivered, the count changes
and the marker for that document changes.

I can't deliver the document AND update the web page at the same time.
Can someone suggest an alternative that would give the customer the same
information and not be too complicated or cumbersome for the customer to
navigate?

Replies