.load()jQuery无法与chrome一起使用? [英] .load() jQuery doesn't work with chrome?
问题描述
我的代码完全可以在Firefox上运行,但不能在Chrome上运行. Google Chrome上的jQuery .load()
是否存在问题?
My code works prefectly on Firefox, but not on Chrome. Is there a problem with jQuery .load()
on Google Chrome?
推荐答案
我遇到了与您完全相同的问题,其中jquery脚本不适用于chrome,但在所有其他浏览器中都适用.
I ran into your exact same problem, where an jquery script wasn't working with chrome but it does work in all the other browsers.
我尚未找到理想的解决方案.但是我相信问题出在Chrome缓存上.
I am yet to find a perfect solution. However I believe the problem is with chromes caching.
如果清除缓存,则脚本可能会成功一次,然后在下一次加载时停止.
if you clear your cache your script will probably succeed one time, and than stop on the next load.
我通过在要检查下载的图像URL上添加一个缓存破坏符解决了我的问题.
I solved my issue by adding a a cache buster onto the image url i was checking for download.
这篇关于.load()jQuery无法与chrome一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!