Jquery.uploadify Plug-ins frequently crash solutions in Chrome browsers

Source: Internet
Author: User
Tags browser cache

This article mainly introduces the Jquery.uploadify plugin in the Chrome browser frequent crash solution, very practical, encountered the same problem, need to solve friends can refer to the

Jquery.uploadify Plug-ins in the Chrome browser frequent crash problem, has been bothering for a long time, the internet many people say because of the reasons for the chrome cache, plug-in initialization, need to reference JS, and the chrome cache caused no request to jquery.uploadify-3.1 _min.js, so cause crash, you can quote JS, add random number: <script type= "Text/javascript src="/JS/JQUERY.UPLOADIFY-3.1_MIN.JS?VER=<? PHP echo rand (0,9999);? > "></script>

In this way, I found that this approach does not completely solve the crash problem, such as when the Uplodify page enters another page, and then clicks back to return to the Uploadify page, the same crash problem occurs.

Completely resolved: settimeout, so that the initialization of Uplodify and browser cache module functions do not at the same time

The code is as follows:
$ (function () {
settimeout (function () {
$ (' #file_upload '). Uploadify ({
' swf ': ' tools/uploadify/uploadify.swf ',
' Uploader ': ' upload.php ',
' Onuploadsuccess ': function (file, data, response) {

}
});
},10);
});

Thanks netizen hoverlees Share this solution, here record down, share to everybody.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.