Refresh in Firefox and autoUpload:true

2 posts, 1 answers
  1. Gunnar
    Gunnar avatar
    4 posts
    Member since:
    Jun 2013

    Posted 10 Sep 2014 Link to this post

    It seems that a refresh (F5) in Firefox automatically re-uploads a previously uploaded file. In other browsers a browser refresh resets the control to its initial state as expected.

    You can reproduce it with the upload demo by selecting a file (uploaded) and hitting F5. You can see that the file is automatically remembered and uploaded.

    Any way to avoid this?

  2. Answer
    Dimiter Madjarov
    Dimiter Madjarov avatar
    2123 posts

    Posted 10 Sep 2014 Link to this post

    Hi Gunnar,

    The reason for the issue is that Firefox has a cache mechanism which stores the values of the input elements on page reload. Here is a very simple example, which demonstrates that this is the case even with a regular input type="file" element. As a workaround, you could set the autocomplete="off" attribute to the input element. Here is a runnable example, which demonstrates this.

    I wish you a great day!

    Dimiter Madjarov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top