Skip to main content
26 events
when toggle format what by license comment
Sep 13, 2011 at 7:48 vote accept dukevin
Sep 13, 2011 at 7:48 comment added dukevin Thanks a lot for your help LazyOne, I appreciate it and will write here when I figure it out :)
Sep 13, 2011 at 7:22 comment added LazyOne @Kevin Maybe it is time to ask this question on StackOverflow.com -- a place for programming questions -- you may have your question answered quicker there. I've told you what headers to use. The other part (JS/HTML) may be answered there.
Sep 13, 2011 at 7:19 comment added LazyOne @Kevin Well -- the only other thing that I can think of right now is not to use history.go(-1), but do the same what you do for onoffcheck.php: add some random parameter at the end of URL. Another thing -- look at JavaScript methods -- maybe there is some functionality/event that is triggered when page is loaded in such "go-back-page" way, so that you can refresh status manually (on timer). I'm not JavaScript guru so cannot advise on this.
Sep 13, 2011 at 6:30 comment added dukevin Is there another way perhaps, or will I have to give up with this method?
Sep 13, 2011 at 6:11 comment added dukevin It would definitly make my life a lot easier if I used php for status.html but the whole reason I'm using iframes is because I cannot use php for status.html. I am going to be uploading this to a file manager and it cannot run php files through it
Sep 12, 2011 at 10:53 comment added LazyOne @Kevin Don't know why it still complains on meta tags. Any way -- try my suggestion about converting it to php (status.php) to send these headers in a proper way to ensure that browser got the headers for sure. Other than that -- no more ideas at the moment.
Sep 12, 2011 at 10:33 comment added dukevin I validated all the errors in the html except 3, which I didn't know how to, or what was wrong.
Sep 12, 2011 at 10:21 comment added LazyOne @Kevin The status.html does not validate (check here) -- this still may be the reason. In any case -- try converting it to PHP (php part will be just sending those headers, the rest will not change) -- this should definitely help.
Sep 12, 2011 at 9:57 comment added dukevin I really appreciate all your help, by the way. Thanks!
Sep 12, 2011 at 9:57 comment added dukevin I have updated the html files to follow standards (I think I did it right). I didn't get any noticeable changes, but could you double check?
Sep 12, 2011 at 9:40 comment added LazyOne I have checked the source code of status.html -- what I'm thinking -- most likely Firefox ignores those META HTTP-EQUIV headers .. as you are using history.go(-1) and your HTML is invalid (you have no doc type, head, body sections, your page ends with </html> without corresponding opening tag). Make that page a valid HTML page (HTML 5 or whatever you prefer) with those headers in proper place etc and try again.
Sep 12, 2011 at 9:31 comment added dukevin Hm, that is quite interesting because when I have firebug enabled, the browser reloads the page, just like how you described. However if firebug is disabled, then the cached page is reused.
Sep 12, 2011 at 9:02 comment added LazyOne @Kevin I have also run the same on another PC, clean Firefox profile .. and does not work here. It does work fine when I install Firebug and watch the Net panel, but when hidden .. it does not always work. I have also installed httpFox extension for Firefox, and when Firebug is off ... it looks like Firefox is not bothered to request the status page again -- the last page is POST page, not GET. I'm puzzled ATM (have not look at your code yet).
Sep 12, 2011 at 8:59 comment added LazyOne @Kevin I'm in London, UK. Checking from my work PC (Windows XP): Works fine in Firefox 6.0.2; Google Chrome 13.0.782.220 m; Opera 11.51; Internet Explorer 7; Internet Explorer 9. Does not work on Safari 5.0.1 (Have not update it for a long time).
Sep 12, 2011 at 8:10 comment added dukevin It only seems to work in Chrome and IE. Opera, Firefox, and Safari fail. My friend confirmed it not working in Firefox but working in Chrome. He lives in Hawaii and I'm in California.
Sep 12, 2011 at 7:47 comment added LazyOne @Kevin If you can -- try on another PC / browser. Simple pressing ON / OFF buttons (like you did in your cast) works absolutely fine here. I'm leaving now and will check again from work. Definitely ask someone else to check it from another place.
Sep 12, 2011 at 7:42 comment added dukevin It doesn't work for me, I did a really quick screencast if you would like to see: youtube.com/watch?v=XKoHyi1-CVg
Sep 12, 2011 at 7:25 comment added LazyOne Definitely work for me right now in Firefox 6.0.2
Sep 12, 2011 at 7:24 comment added LazyOne @Kevin Pressing ON or OFF buttons works fine for me -- I see the status changed. I have waited for 2 updates (so status stays the same), then I've opened another tab and changed the status there ... and on next update on the first tab the status has changed there as well. As far as I can tell it's working. I'm about to go to work ... so cannot test right now any more .. but will look again in about 1 hour or so to double check.
Sep 12, 2011 at 7:22 comment added dukevin I added your header on the php files and all the html files with <META HTTP-EQUIV ...>
Sep 12, 2011 at 7:13 comment added dukevin Nope, still no luck :( I have a little demo here so you can try it out: 109.169.58.107/test/sand/status.html pressing on the on/off buttons will make it say offline or online but only if you press the refresh on your browser after it redirects. You can view the source files here: 109.169.58.107/test/sand
Sep 12, 2011 at 1:25 comment added LazyOne @Kevin Possibly because of wrong date: 01/01/1980 was Tuesday and not Thursday (my bad -- typo). Make sure you are using correct date any way. Also try restarting browser after clearing caches (it should not really affect browser .. just in case). Apart of that -- it should work (definitely works fine for me on basket/shopping cart pages) -- maybe it's affected by iframe thing .. not sure.
Sep 12, 2011 at 1:12 history edited LazyOne CC BY-SA 3.0
edited body
Sep 12, 2011 at 1:03 comment added dukevin I'm excited it works :) However by putting these on my php file didn't work header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); header("Expires: Thu, 1 Jan 1980 00:00:00 GMT");
Sep 12, 2011 at 0:43 history answered LazyOne CC BY-SA 3.0