Jump to content

[SOLVED] ajax prob on other server


nadeemshafi9

Recommended Posts

in php 5 on my windows machine local my javascript uses ajax to call a php script which gens a rand and then teh javascript inserts it into the page

......

http.open('get', 'test.php');

.....

 

it works fine on my lcal machine

 

1 ...... 3443 ..... 4353 ..... 5654 .... 35656

 

 

on my live server php4 apache its like the scrippt output is generated once then the output is cached maybe because it keeps giving me he same number

 

3 .... 3.... 3.... 3.... 3..

Link to comment
Share on other sites

in php 5 on my windows machine local my javascript uses ajax to call a php script which gens a rand and then teh javascript inserts it into the page

......

http.open('get', 'test.php');

.....

 

it works fine on my lcal machine

 

1 ...... 3443 ..... 4353 ..... 5654 .... 35656

 

 

on my live server php4 apache its like the scrippt output is generated once then the output is cached maybe because it keeps giving me he same number

 

3 .... 3.... 3.... 3.... 3..

 

SOLVED

 

header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT");

header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" );

header( "Cache-Control: no-cache, must-revalidate" );

header( "Pragma: no-cache");

 

note: in the future; refer to this forum for your ajax questions. ;)

 

http://www.phpfreaks.com/forums/index.php/board,51.0.html

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.