Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
IE not refreshing page
Old 05-29-2009, 01:06 PM IE not refreshing page
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
On this page I'm designing, I have an ajax script that loads another page into a div. The problem is when I update the external page, it never shows the new, updated external page in IE6. I have to clear the cache for it to show the updated page. This is the page with the problem. It works fine in Firefox (wow I love that browser), but if your IE has seen the old version of the page, it won't show the new one. Even if you refresh the page, it only refreshs that page, not the external one. Could it be a problem with my script that just isn't compatible or is this a common problem in IE that I have to work around?

I have had so many problems with IE it's not even funny. Thanks so much for the help!
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
 
Register now for full access!
Old 05-29-2009, 01:18 PM Re: IE not refreshing page
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
This is what IE does with any content that is called via an AJAX call. It's a pain, but to deal with this you must send real no-cache headers on the external page. In PHP this is done something like this:
PHP Code:
<?php
header
("Cache-Control: no-cache, must-revalidate");//http 1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");//a date in the past
?>
There's other ways to do it, depending on what server language you use. It could be done externally via .htaccess on Apache also, though you would have to look into that, since I'm not sure how. Bottom line, it must be done for IE.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-02-2009, 02:40 AM Re: IE not refreshing page
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
My server doesn't support php or asp, so is there a way I could do this is javascript? I've tried tons of meta tags, none of which I've really got to work. Searching the internet for this answer, I just find scripts that don't work for anyone. Know a script that solves this problem for sure?

I've looked into putting a script on the page to refresh so that it replaces the cached image, but I haven't really got any of those to work either. Is this a possibility at all?

Thanks so much for your help on this!
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
Old 06-02-2009, 08:39 AM Re: IE not refreshing page
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
is it an Apache server, or IIS? or what?

If you're not able to use a programming language, there isn't any reason to be using AJAX.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-02-2009, 02:36 PM Re: IE not refreshing page
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
Honestly, I know nothing about our server - that is a network manager's area. But he said it is IIS, although BorderManager that we are running may be creating some problems. And now that I ask him, he says it is php compatible, although I couldn't get it to work.

Is there a way to do what I'm trying to do without using the AJAX script then tio get around all this? Sorry I'm new at this, but your help is very much appreciated.
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
Old 06-02-2009, 04:24 PM Re: IE not refreshing page
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
If you don't know anything about the server, you shouldn't be using AJAX. That is pretty much the end of the story. AJAX is made for interacting with the server, so if you don't have some programming on the other end, there is no advantage to calling stuff asynchronously, especially since doing so is somewhat slow.

If all you need is one external file that is shared over multiple page, or "included" onto the page, you should be doing that inclusion from the server itself. Since you have PHP available, name your files with a .php extension, and do something like this:
PHP Code:
<!--HTML-->
<div>
<?php include "path/to/included-file.htm";?>
</div>
<!--more HTML-->
This will avoid the lag of an AJAX call just to call some content. Plus, the content will still be available even if JavaScript is disabled.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-03-2009, 07:50 PM Re: IE not refreshing page
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
I must be doing something wrong, because I could not get the php to work. I ended up just using an iframe, although it doesn't adjust with the length of my content. Thank you so much for the help you have given me on this though!
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
Old 06-04-2009, 11:01 AM Re: IE not refreshing page
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Are your files named with a .php extension? Not the ones that are called by the include, but the main files that are calling the include.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-09-2009, 02:50 PM Re: IE not refreshing page
wildbackpacker's Avatar
Extreme Talker

Posts: 162
Name: Colton
Location: Utah, USA
Trades: 0
Yup I had the files labeled with the .php extension. But I gave up on that long ago. I've found a way around it now so that it all works now though so thanks for your help!
__________________
Colton
Wild Backpacker

Please login or register to view this content. Registration is FREE
wildbackpacker is offline
Reply With Quote
View Public Profile Visit wildbackpacker's homepage!
 
Reply     « Reply to IE not refreshing page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.10538 seconds with 12 queries