Forward and back button is a different story...I think there may be a plugin
for that?
-- Josh
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Saturday, October 06, 2007 10:40 AM
Subject: [jQuery] Re: force page to load content from another page
Thanks for the idea.
I tired it by switching my load code out with the code below but still
no luck. When I watch firebug I can see create.cfm be called when I
first hit the page, but when I use the forward and back button to hit
the page it never calls create.cfm again (until I manually refresh)
Here is the .ajax code:
$(document).ready(function(){
$.ajax({
url: "create.cfm",
cache: false,
success: function(html){
$("#target").append(html);
}
});
On Oct 6, 11:29 am, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
Try using the $.ajax function instead of load (load just does an ajax
get),
with cache param set to false.
-- Josh
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Saturday, October 06, 2007 10:11 AM
Subject: [jQuery] force page to load content from another page
> I need the page to be forced to load content EACH TIME the page
> loads. If I do this:
> $(document).ready(function(){
> $('#target').load('create.cfm');
> });
> The page will grab the stuff from create.cfm and load it into the div
> as it should. (Note: Create.cfm contains the current timestamp)
> The problem is that if I use the back button or forward button and
> come back to the page, when that page is displayed again, the "load"
> function never fires again and thus I see a cached timestamp that is
> not valid.
> I am looking for a way to FORCE the page to load dynamic content from
> another page, EACH TIME the page is accessed. A good example of this
> is at:http://recaptcha.net/fastcgi/demo/recaptchato see it in action
> fill out the form incorrectly, then press the back button. You will
> see that you are not presented with cached content but rather new,
> dynamic content.
> Any of you guru's out there have any ideas?