Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AJAX with PHP

Status
Not open for further replies.

laurin1

MIS
Apr 28, 2003
77
US
Here's something I don't like about AJAX. Maybe, someone has a solution.

When I'm testing out code, if I change the POST/GET page (not the calling page), I have to close and reopen Internet Explorer to see the changes. Hitting refresh does not work.

Keith Davis
MCSA, A+, N+, Guru+, Geek+, Child of God++++++
Love and Service
 
I have this same problem when trying to debug the js code in Firefox. You can never refresh the page, but always have to go to Tools > Options > Privacy and press the Clear All button to clear the cache. It's the only way to get the new js code changes to run in the Firefox browser. I've never had a problem with IE seeing my immediate code changes. Not sure why, but I've never had to deal with it.

Todd
 
i use firefox all the time and i've never had the problem you described.
Thats probobly because firefox browsers know better than to misbehave while being used by clflava.
 
Um... it's a simple case of cache-busting (probably). Add a unique extra to the end of your params (so the request is unique). I use this kind of solution for the ajax apps I work with:
Code:
var cacheBuster = "&cb=" + new Date().getTime();
Then append the contents of the cacheBuster variable to the end of your URL (if you do not already have GET parameters being passed through, then you will need to use a "?" instead of a "&" character).

Let us know how you get on.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Thats probobly because firefox browsers know better than to misbehave while being used by clflava

Bingo!

-kaht

Looking for a puppy?

silky-icon-left.gif
[small]Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.[/small]
silky-icon-right.gif
 
Agree with BabyJeffy, although I simply add a "?1" or "&1" to the URLs. I also do this every time when loading oft-changing CSS (or JS) files in <HEAD>. Defeats the cache curse when developing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top