Share this post! | Vote this! |
|
One of the greatest issues with web development at the moment is how images can be uploaded to a website. This generally requires a file upload field per image, and usually a complete page refresh in order to upload the file. Not only is this daunting for the user - who is probably on the slower side of the internet connection - but also for the developer and the server.
The server has to process this in real time, on page refresh and along with loading the rest of the page all while it copies the file from the user device to the server in the form of a temporary file and then move that same temporary file to the desired location and rename it in the process.
Obviously the best way to handle all of this is of course to handle it all using Ajax. What I am always concerned about, though, is the user experience. Do we really need to reload the entire page? Can we show the progress as we upload to let the user know how far we are? Of course we can - and we're going to use HTML5, JavaScript, and a bit of PHP (but we'll leave the PHP processing to the developer). Let me assure you that before HTML5, this was a complete nightmare to do if you did not have a Flash solution and a dedicated server. Trust me, I tried.
More...
The server has to process this in real time, on page refresh and along with loading the rest of the page all while it copies the file from the user device to the server in the form of a temporary file and then move that same temporary file to the desired location and rename it in the process.
Obviously the best way to handle all of this is of course to handle it all using Ajax. What I am always concerned about, though, is the user experience. Do we really need to reload the entire page? Can we show the progress as we upload to let the user know how far we are? Of course we can - and we're going to use HTML5, JavaScript, and a bit of PHP (but we'll leave the PHP processing to the developer). Let me assure you that before HTML5, this was a complete nightmare to do if you did not have a Flash solution and a dedicated server. Trust me, I tried.
More...
0 comments:
Post a Comment