473,586 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help! Subsequent Get Requests using xmlhttp return identical results

Has anybody experienced the following? The below Get request is called
when a button on the page is clicked:

function GetTranscript() {
var oSend = new ActiveXObject(" Msxml2.XMLHTTP. 3.0");
oSend.Open("GET ", "transcript.asp x", true);
oSend.onreadyst atechange = function() {
if (oSend.readySta te == 4) {
alert(oSend.res ponseText);
oSend.send(null );
oSend = null;
return false;

The page transcript.aspx returns the current date, i.e.
private void Page_Load(objec t sender, System.EventArg s e)
// Put user code to initialize the page here
Response.Write( System.DateTime .Now.ToLongTime String());

The first call through xmlhttp works great. Subsequent calls return
the same exact time.

HELP! Dont know what else to do.

dead in the water,

Jul 23 '05 #1
4 1662
tlang wrote:
Has anybody experienced the following? The below Get request is called
when a button on the page is clicked:

function GetTranscript() {
var oSend = new ActiveXObject(" Msxml2.XMLHTTP. 3.0");
It may be that it's getting the page from a cache somewhere, but never
experienced this problem. What you can try doing is making the file name
unique so that it forces it from the server:

myFile = "transcript.asp x?" + new Date().getTime( );
oSend.Open("GET ", "transcript.asp x", true);

oSend.Open("GET ",myFile,tr ue);

It may work, it may not, but worth trying.

comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #2

Thanks Randy. This worked:
<script language="javas cript">
function GetTranscript() {
var oSend = new ActiveXObject(" Msxml2.XMLHTTP. 3.0");
myFile = "transcript.asp x?time=" + new Date().getTime( );
oSend.Open("GET ", myFile, true);
oSend.onreadyst atechange = function() {
if (oSend.readySta te == 4) {
alert(oSend.res ponseText);
oSend = null;
oSend.send(null );
return false;

Not sure why the output of the aspx file was cached. I thought the
point of aspx files is that their contents is dynamic. I would think
making it static would be an explicit property setting. I'll try to
find out more info on that.


Jul 23 '05 #3
>Not sure why the output of the aspx file was cached. I thought
the point of aspx files is that their contents is dynamic.

What you saw is normal.

Page contents can be dynamic, but unless you specify a different URL
(or use a POST instead of a GET), the browser will use the page with
the same URL from cache. (Assuming you haven't used an expiration date
or other methods to prevent that.)

We have an internal site that makes extensive use of cached files to
speed up usage over dialup. To force a download, we use the method as
was suggested... adding the date to create a new version parameter.


Jul 23 '05 #4
Randy is right... transcript.aspx is being cached.... I've had the same
problem, and it can be quickly solved just by sending no-cache request
headers... For IE, the following alone will do it:

oSend.setReques tHeader("If-Modified-Since","Wed, 15 Nov 1995 04:58:08

Don't know for other browsers, but try these:

oSend.setReques tHeader("Expire s", "Wed, 15 Nov 1995 04:58:08 GMT");
oSend.setReques tHeader("Last-Modified", "Wed, 15 Nov 1995 04:58:08
oSend.setReques tHeader("Cache-Control", "no-cache, must-revalidate");
oSend.setReques tHeader("Pragma ", "no-cache");

Let us know if it worked..

[ ]'s

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help Workshop program: hcw.exe that's included with Visual Basic. This exact same file compiled perfectly with no notes, warnings or errors prior to...
by: Tom | last post by:
A question for gui application programmers. . . I 've got some GUI programs, written in Python/wxPython, and I've got a help button and a help menu item. Also, I've got a compiled file made with the microsoft HTML workshop utility, lets call it c:\path\help.chm. My question is how do you launch it from the GUI? What logic do I put behind...
by: d.warnermurray | last post by:
I am doing a project for school that involves creating help files for a html authoring tool. If you could help me with answers to some questions it would really help. 1. What tasks do you expect an html authoring tool to help you accomplish? 2. What do you expect from online help for a html authoring tool? 3. What audience do you think...
by: BT Openworld | last post by:
I have just had to upgrade to Access 2003 as Access 97 EMail (SendObject) doesn't work when loaded on Windows XP. I'm finding my way around Access 2003 but my biggest problem is getting information. When I bought Access 1.0 many years ago, I got a paper manual and an excellent help file with all you needed to know. With Access 97 the manual...
by: Bruce Dodds | last post by:
I recently started using Access 2003 for the first time. I wanted to pass on some comments about the Help system to Access MVPs who frequent this board. I'm doing this in the hope that some of what I say may be passed on to Microsoft. Microsoft has implemented a combination local and web based help system in Access 2003. The local Help...
by: dixie | last post by:
I was wondering if there is a way of doing a simple help system with either viewing a page in a browser or looking at a definite page in a .pdf file when a help button was pushed on an Access application form. I understand there are other ways of doing help files, but are these possible, what is the easiest and how much work is it? dixie
by: lord.zoltar | last post by:
I've managed to get a nice little chm help system written. Now I need to display it! I added a HelpProvider to my MDIParent form and set the namespace of the HelpProvider to be the help file. So far so good - when I press F1, I get HTML Help popping up with my Help file. This is good but I've been requested to make Help pop up when the user...
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably the worst I ever seen. I almost cannot find anything I need, including things I
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve default property of object Label. Click for more:...
by: hitencontractor | last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003. I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About. The application calls MS Excel, so the scenario is that I am supposed to see the Excel Menu bar, FILE EDIT VIEW INSERT ... HELP. I am able to see the menu bar, but in...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.