Loading
« IE Screen Resolution and Caching issues
I am having multiple problems with IE 8. Here are the two main issues I have:
- Screen Resolution issue – I don’t understand why a web page would render differently on two different computers, that are on the same OS (Windows XP SP3), using IE 8.06 and the same resolution 1024×768???? The page renders fine on both Chrome and Firefox. As is normal in such cases, the page works fine on IE on my laptop and other machines in the office.
- Caching issue – We have a desktop application that reads an XML file on the server. While the application works fine on all the machines, on one of the machines, it caches the XML content. The desktop app (C#) uses dataset.readXML and specifies the URL. What is weird is that if we open the XML in IE, it too shows the cached information. If we hit CTRL+F5 in IE, it loads the latest version and interestingly, our desktop application also gets the latest content automatically. I am assuming that the readXML call is using the same libraries that IE is probably using. While we have a workaround on the server side (cache-control and page expires HTTP Headers), I am wondering why it has this problem only on that machine. We did try clearing the cache and set “Check for newer versions of stored pages everytime I visit the page”, but that does not help on the machine.
Any thoughts?
Tech Force One is my web log related to technologies, I use day to day.
5
-
5 commentsto “IE Screen Resolution and Caching issues”
For Caching Issue: I had the similar problem of browser caching the files, especially when using ModalDialog. You can append a query string and pass a different value using Random.Next(). So that browser thinks its a new request and raise a new call to the server.
Instead of reading the XML file directly on the server. You can send request to an intermediate page, that in turn will return the XML out.(like getXML.aspx?param1=12345)
Yes, we did the same and included header directives for cache-control and page-expires. I don’t think we are using ModalDialog in our desktop app though. What frustrates me here is that it happens on only 2 machines; I don’t have this problem on other machines. Thanks
No sir, I just said for example. The desktop application might be using HttpWebRequest to get the XML file. Here what am saying is, send the request to aspx page that in turn will emit the XML file. When you append different query string, a new request will be sent to the server. So you will always get latest XML file from server.
Thanks
Hi Balu – I got your point; I did not want to explain in detail on how we implemented it because our server side code is running on LAMP and the desktop app is built on C#.
Here is the server side code we used, in addition to randomizing the URL (like you mentioned). We are using dataset.readXML directly instead of HTTPWebRequest.
header(‘Content-type: text/xml’);
header(“Cache-Control: no-cache, must-revalidate”);
header(“Expires: Sat, 26 Jul 1997 05:00:00 GMT”);
echo file_get_contents(‘/home/kumar/www/XML/Schedules.xml’);
Thanks!
Yes sir, You still have the option of randomizing the URL. No matter which server & language is used. Just appending a query string to a URL will not affect anything.
Thanks