On Sun, 23 May 2004 10:06:30 GMT, Ammar Majeed <ammar.majeed.DeleteThis@comhem.se>
wrote:
> Hi all...
> I am building my own website now, and in one of the pages i have a form
> with
> a link that calls entry to guest book on anoher frame, my problem is:
> that
> when i click on the link, the page reloads from cash not fromt he server
> and
> i have to reload the page manually to see the new posts, any tricks to
> load
> the page from the server instead ???
> thank you
If a browser is determined to cache a page it's darn well going to cache
that page, no matter what you do. If you own the guestbook and can edit
the code, you might want to serve some no-cache type headers with it. It
won't work 100% of the time, but pretty close to 99%.
Other than that, you can try to link to the guestbook with a random query
string. Say for instance the URI of the guestbook is guestbook.html You
could make a link like the following:
If you can't use PHP:
<a id="guestbooklink" href="guestbook.html">Guestbook</a>
<script type="text/javascript">
var now = new Date();
var fake = now.getTime() / 1000;
document.getElementById('guestbooklink').href += "?fake=" + fake;
</script>
If you can use PHP:
echo "
Guestbook
Both of those will give you a new link every second, and adding a query
string like the above might trick browsers into thinking they're loading a
new page.
Grey
--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - Orca Knowledgebase - Fully styleable
PHP/MySQL FAQ system.<!-- ~MESSAGE_AFTER~ -->