English 中文(简体)
• 如何制止单列单的单列单的单壳结果
原标题:How to stop the results of a jquery php load being cached

我有一个新问题,即“司法”实际上影响到每一个使用阿富汗复兴开发银行的人。 我有一个超文本/Java文本(用j Query呼号)将.php装入我的网页,但似乎在收集结果,而且往往只是收回附卡的信息,而不是改用购买力平价字母。

下面的法典是我如何试图克服这一问题(法典的比克·阿兹梅加卡帕——我只是试图增加海滩:面粉——但似乎有工作。

$(document).ready(function() {
    cache: false
    $( #selecthere ).load( /temp/php_script.php , function () { //callback
        $( select , this).change(function () { //catch onchange event of select
            //call your function here, pass the selected value
            initialize($(this).val());
        });
    });
});`
最佳回答

Just add a random number to the end

var random = Math.random() * 10;
$( #selecthere ).load( /temp/php_script.php?r=  + random, function () { 
问题回答

页: 1 php档案应当发送正确的头盔,以防止砍刀。

<?php
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>

它想像你那样做ache事:错误。

$(document).ready(function() { 
    $.ajax( /temp/php_script.php , 
       { 
           cache: false, 
           success: function(result) {
               $( #selecthere ).html(result);
           }
       }
    );
});




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签