PDA

View Full Version : JS Help



Invent
26-04-2007, 06:48 PM
Hey,

Right I've made an alert system for Powerpanel and the alert (which looks like a Habbo hotel alert) shows in a DIV which auto refreshes like every 10 seconds.

In firefox the div updates fine but in IE it sort of caches the alerts.php page so it doesnt realise when an alert has been sent or not.

So what I need to do is to stop IE from caching the page and always grab the pages new data.

My current JS can be found at: http://www.powerpanel.duosystems.net/2.0/frontend.

So if you know how I can stop it from caching the page that would be great!

Thanks,

-Simon

phpme
27-04-2007, 03:54 AM
Your Powerpanel IS A COPY of KC2 LOL

Sygon..
27-04-2007, 06:53 PM
Your Powerpanel IS A COPY of KC2 LOL

U IZ A NOOB LOL.


Edited by Catzsy (Forum Super Moderator): Please consider the feelings of others.

timROGERS
27-04-2007, 06:56 PM
Hey,

Right I've made an alert system for Powerpanel and the alert (which looks like a Habbo hotel alert) shows in a DIV which auto refreshes like every 10 seconds.

In firefox the div updates fine but in IE it sort of caches the alerts.php page so it doesnt realise when an alert has been sent or not.

So what I need to do is to stop IE from caching the page and always grab the pages new data.

My current JS can be found at: http://www.powerpanel.duosystems.net/2.0/frontend.

So if you know how I can stop it from caching the page that would be great!

Thanks,

-Simon


In theory, you should just be able to add the following PHP:



<?php
header("Cache-Control: no-cache");
?>

However, it's quite likely that you'll get Headers Already Sent errors - if you do, reply and I'll help :)

Blob
27-04-2007, 08:08 PM
Well it uses the same style switcher as KP, lets see what it turns out like.

QuickScriptz
28-04-2007, 03:19 AM
Um... not caching... I believe that you can just use a meta tag for that can't you? I do know that it's not very complicated at all.

If you want a JS solution though you can try posting on CodingForums.Com (http://www.codingforums.com) - they are always really helpful with all of my needs (im Troy297 incase you care).

Want to hide these adverts? Register an account for free!