If I load some content with ajax (jQuery) which has a script tag in it, jQuery 1.5 adds the timestamp to the script tag src url. See example bellow.
Example:
content what I load with ajax:
<div>text1</div>
<script type="text/javascript" src="/js/abc-xyz.js?r=1.1"></script>
This is the src url from where it loads the script code after I insert the previous content to the page:
.../js/abc-xyz.js?r=1.1&_=1297892228466
Does anybody knows why this happening?
It happens only with jQuery 1.5. It doesn't happen with jQuery 1.4.4.
Code Example:
$.ajax({
url: content.html,
type: 'GET',
data: someDataObject,
success: function(data) {
// some code here
},
error: function(data) {
// some code here
}
});
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…