Posted in PHP on 02/09/2010 09:45 pm by ycTIN
Some time you may want the user download the file instead of direct open in the browser.
(e.g. The PDF reader add-on will be directly open the PDF in the browser)
You just need modify the http headers and set the content type to force-download, the problem will be solved.
The following is the demo and the source code:
Read the rest of this entry »
Posted in Experience & Notes on 12/01/2009 08:16 pm by ycTIN
The popular HTTP response code with simple description:
2xx Success
200 OK
Good status, server return successful
3xx Redirection
301 Moved Permanently
Permanently redirect to new URL, better in the SEO (Recommend)
302 Found
Temporary redirect to new URL(Default)
304 Not Modified
The request resource has not been modified since last requested. Browser will load the content from cached (IE may not)
Read the rest of this entry »