Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • HTML5 Download Attribute

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 73
    Comment on it

    Hi All,

    Recently I came across new features in HTML5 that was quite impressive and one such is the new download attribute. This new feature allows you to set a separate download file name than the actual file name available in the link itself.

    <a href="http://www.planwallpaper.com/static/images/Winter-Tiger-Wild-Cat-Images.jpg" download="animal.jpg">Download Animal Image</a>
    

    So, when the end user clicks on the link, the download attribute name appears in the save dialog and not the file actual name which can be sometime very messy. In above case, the file will be downloaded as animal.jpg and not the Winter-Tiger-Wild-Cat-Images.jpg

    Things to be taken care off. Firstly, the file name on the server side needs to be unique, however the download attribute allows the file name to be more meaningful.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: