Forums
This topic is locked
Automatic refresh
Posted 16 Dec 2002 10:11:45
1
has voted
16 Dec 2002 10:11:45 Jon Stanton posted:
I'm working on a site using DMX and PHP_Mysql but the dynamic pages need to be refreshed with CTRL-F5 or they don't show the up-to-date information. I've tried every metatag to stop the page from caching but nothing is working. Is there a PHP command or script that can accomplish this? I just can't find anything anywhere. ASP has such a beast <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> Replies
Replied 16 Dec 2002 10:49:21
16 Dec 2002 10:49:21 Iain Stewart replied:
If you pass your values as a URL parameter then the page should refresh as it loads with the new url.
www.yourpage.com/index.php
www.yourpage.com/index.php?column=value
and use the url param to filter the info from your database, works for me.
Iain
head hurts, 'mental note to self, stop banging head !'
www.yourpage.com/index.php
www.yourpage.com/index.php?column=value
and use the url param to filter the info from your database, works for me.
Iain
head hurts, 'mental note to self, stop banging head !'
Replied 16 Dec 2002 12:05:34
16 Dec 2002 12:05:34 Jon Stanton replied:
Thanks Iain
That makes sense. I shall try it and see how it goes.
All the best
Jon
That makes sense. I shall try it and see how it goes.
All the best
Jon
Replied 16 Dec 2002 16:32:12
16 Dec 2002 16:32:12 Jon Stanton replied:
Hi Iain
Yes, this sorts it out perfectly. One last query though, the site has dynamic data on the index page (index.php) so it doesn't have any parameters passed to it. How could I get round this? Presumerably the only way is to rename it to index2.php and have a redirect on index.php which includes the parameter? Do you know of a better method?
Yes, this sorts it out perfectly. One last query though, the site has dynamic data on the index page (index.php) so it doesn't have any parameters passed to it. How could I get round this? Presumerably the only way is to rename it to index2.php and have a redirect on index.php which includes the parameter? Do you know of a better method?
Replied 16 Dec 2002 18:39:17
16 Dec 2002 18:39:17 Iain Stewart replied:
Ok,
I think this should work, just had a play around and it seems to work.
On the index page go to your recordset and open up the recordset. change from simple view to addvanced view.
you should have something like
WHERE column = 'colname'
in the varibles box change the default value to what ever you want the recordset to filter from the database
save this, now when you open up the index.php it should filter the db with the default value even though there is no url.
hope this helps
Iain
head hurts, 'mental note to self, stop banging head !'
I think this should work, just had a play around and it seems to work.
On the index page go to your recordset and open up the recordset. change from simple view to addvanced view.
you should have something like
WHERE column = 'colname'
in the varibles box change the default value to what ever you want the recordset to filter from the database
save this, now when you open up the index.php it should filter the db with the default value even though there is no url.
hope this helps
Iain
head hurts, 'mental note to self, stop banging head !'
Replied 17 Dec 2002 11:19:55
17 Dec 2002 11:19:55 Jon Stanton replied:
Thanks again Iain
I'll try your suggestion and let you know how it goes. For now I've gone the redirect route and my customer is happy.
I'll try your suggestion and let you know how it goes. For now I've gone the redirect route and my customer is happy.
Replied 13 Jan 2003 12:10:50
13 Jan 2003 12:10:50 Julio Taylor replied:
jstanton,
another way you can do this is to specify a default value in the query, and then using this default value in the WHERE condition instead of requesting a GET_VAR.
However i also think that there should be a way to keep the page from caching, simply because the dynamic data is always created at real-time and i don't see a way by which is can be stored by the browser as a cacheable element.
I have an extension which i can pass on if you're still interested...
Hope it helps.
------------------------
Julio
PHP | MySQL | UD4
ICQ: 19735247
another way you can do this is to specify a default value in the query, and then using this default value in the WHERE condition instead of requesting a GET_VAR.
However i also think that there should be a way to keep the page from caching, simply because the dynamic data is always created at real-time and i don't see a way by which is can be stored by the browser as a cacheable element.
I have an extension which i can pass on if you're still interested...
Hope it helps.
------------------------
Julio
PHP | MySQL | UD4
ICQ: 19735247
Replied 13 Jan 2003 17:26:51
13 Jan 2003 17:26:51 Jon Stanton replied:
Yes, an extension to accomplish may be very useful. Is it Dreamweaver MX compatible?
Many thanks.
Many thanks.
Replied 13 Jan 2003 18:16:49
13 Jan 2003 18:16:49 Julio Taylor replied:
I'm not sure it's MX compatible, but i'll post a link for it here when i find it. I've been using it on UD4
------------------------
Julio
PHP | MySQL | UD4
ICQ: 19735247
------------------------
Julio
PHP | MySQL | UD4
ICQ: 19735247
Replied 13 Jan 2003 18:27:40
13 Jan 2003 18:27:40 Jon Stanton replied:
Thanks Julio. That would be most helpful.
All the best
Jon
All the best
Jon