I have a directory outside of webroot with images, css and javascripts.
These files change frequently.
I could write a script that finds the file, determines the type of mime and displays it in the browser.
Or
I can find the file, copy it to a web-accessible directory and redirect to that file using the header location. When the file is requested again, it will first check if the file has been modified, and then redirect again.
What would be better? Each request to the readfile or each request will timestamp and redirect (so 2 requests instead of one)
user129626
source
share