Caching Problem With HTTPRequest?

Oct 28, 2005

I've created a page that uses HTTPRequest to include some
XML data and allow the user to update that data. The
problem is that the new data doesn't show up, even though
the XML file is changed.

I can call the XML file up in a separate browser window,
where I get the old data, refresh to get the new data, then
when I refresh the first browser, the new data appears on
the page.

I'm thinking this might be some sort of server caching
issue. Has anyone else run into this? Does anyone have a
solution?

View 3 Replies


ADVERTISEMENT

HttpRequest And Timeout

Dec 20, 2005

I use an HttpRequest in my web application to launch an heavy
computation server side. The result is then send back to the browser.
The problem I got is that when the computation took too much time, then
I never get the result. I have to reload the page to get it.

I assume it's because my socket connection has time out, but my event
listener does not seems to get any event. Maybe I miss something:

function xmlhttpChange()
{
// looking fo a xmlhttp "loaded"
for (var i in nodeId2xmlHttp) {
if ((nodeId2xmlHttp[i] != null) && nodeId2xmlHttp[i].readyState ==
4) {
if (nodeId2xmlHttp[i].status==200) {
nodeId2xmlHttp[i] = null;
} else {
alert("Problem retrieving XML data (nodeId: " + i + ")");
nodeId2xmlHttp[i] = null;
}
}
}
}

My question is : how to handle XMLHttpRequest timeout. Any pointers?

View 3 Replies View Related

JQuery :: Focus A Field When It Come From Httprequest?

Dec 1, 2011

When I click on a field, I put the object position in a variableEnviro["lastfocus"] = $(event.target);I call the action and a block of HTML arrived on the page, I place this text and then after, i want the focus to return to the field and I do this:

$(Enviro["lastfocus"][0]).focus();

But nothing append

View 2 Replies View Related

HTTPRequest Problems Updating 'hidden' Objects?

Nov 23, 2005

I am finding some unusual behavior with techniques I am using to
show/hide/update data without having to refresh the page. I'm quite
sure it's developer ignorance on my part and would be grateful for any
suggestions.

My page has 10 tables with their visibility controlled by the user
making a menu selection. For example, selecting menu_1 calls a
function which displays table_1 by setting table_1's style display:
block and hides tables 2-10 by setting their respective styles to
display: none. Everything in this simple navigational approach works
as expected.

I am also using the HTTPRequest object to update relevant objects on
the page based on user input. The problem I am seeing is when the
HTTPRequest object is used to update DOM objects contained within the
"invisible" tables -- or more accurately within those tables having
their style display:none. I have tried using both the HTTPRequest
object's synchronous and asynchronous approach and am seeing the same
results.

I've tested when all of the tables are "visible" by setting their style
settings to display:block and HTTPRequest calls work as expected.

The other twist in my example is that these HTTPRequest calls are each
making a SQL query and updating a chart object within the table, which
may take about 500ms each to return. My initial impression is that it
looks as if the page is being rendered too fast because any more than
three charts on a page is when the charts start getting misplaced on
the page. Again, everything works fine when all tables are visible.

Is this a known problem with HTTPRequest, or do I need to migrate my
coding techniques to the 21th century?

View 1 Replies View Related

Query :: Access $Link From The Httprequest Result?

May 25, 2011

I'm trying to run a php query via ajax httprequest. In my php script I have query result. I am also creating a txt file and link to the file. The query result then becomes the link to the file like so:

[Code]...

where $counter[0] is the result of the query. How do I access $Link from the httprequest result so I end up with something like this:

[Code]...

View 2 Replies View Related

JQuery :: Put The Focus On Input Text After HttpRequest Return?

Dec 1, 2011

first, i put the object on a variableEnviro["lastfocus"] = $(event.target);after that i do an action and the data come back from the httpRequestthen I do that$(Enviro["lastfocus"][0]).focus();But nothhing append, no error bot no result.

View 1 Replies View Related

XML And Caching

Jul 23, 2005

If I use javascript to 'read' and XML file does that mean that the XML
file gets downloaded to the user's cache?

I'm building a quiz and I'd rather not have the answers too easily
available. I believe there's no real way to secure anything client side
with javascript so I'm just trying to keep the curious at bay.

View 3 Replies View Related

HTTPRequest Freezes For 5 Minutes Intermittently And Throws "Unknown Name" Javascript Exception

Dec 4, 2006

I am using the Microsoft.XMLHTTP object to make server requests ie;
ajax. This is working 99% of the time but occasionally it will freeze
at the server for 5 minutes and then raise a javascript exception
"Unknown name".

After the exception I can run the same request ok, and keep doing so
until the next time it freezes for 5 minutes.

What does the "Unknown name" javascript exception mean?

Why does it freeze for 5 minutes?

I can't replicate this on my dev pc, it's only happening in a live
environment with IE6 and 2 load balanced IIS6 servers.

View 2 Replies View Related

IE Caching Javascript

Apr 23, 2006

I have a oc4j application server hosting my application . I can see
from tcp monitor for eg: GET /scripts/main.js and the server responds
with last-modified timestamp. However for subsequent request IE does
not use if-modified-since and further for each script in Local Settings
is getting cached as main[1].js, main[2].js etc and also in different
directories. This does not happen for all script but if a page has some
15 scripts included the last 5 scripts show this behaviour.

View 5 Replies View Related

NO Caching Of A SWF File

Jan 27, 2009

I had an incident in which I uploaded a swf file with an incorrect URL. Well, when I noticed the issue I uploaded a 'new' file - but those who have previously seen the site kept seeing this "older .swf".Without a huge proces. renaming files, modifying html files etc.. Is there a way to customize a meta tag or some other mechanism to have a '.swf' file NOT CACHE. It has to not cache in all browsers.. ala: ie, ff, safari

View 2 Replies View Related

Location.href Caching And ASP

Jul 23, 2005

I'm passing the asp parameters using the url current page is files.asp and I'm using window.location.href=files.asp?action=deletefile to pass the action to the serverside

My code never got executed (like the page was cached) unless i put document.write("") before the window.location directive.

Here's the code:

function confirmDelete(x){
var potvrda=confirm("Kliknite OK za brisanje. Cancel za povratak.");
if (potvrda==true) {
trans="files.asp?action="+x;
document.write("")
window.location.href=trans;
}
else {}
}

View 9 Replies View Related

Xmldoc.load Not Caching

Aug 8, 2005

var xmlfileLoaded = xmlDoc.load(xmlFileName);

and we noticed that this files are not cached in numbers of clients Internet
Exporer v6.

We see in httprequest log this request.

We also tried to gzip the request but probably xmlDoc not allowed it.

View 1 Replies View Related

IE 6 Caching IMG Problem Using AppendChild()

Nov 23, 2005

This example
will show that the first call to "doit()" will print 30 times the image
with only one call to the server. Then I have a timeout and call doit()
again, and this time, it downloads the picture 30 times!!!! It doesn't
even time to finish downloading the pictures before the next timeout
kicks off and if I let it go for a minute or two i have like 300 calls
to download the same image trying to be downloaded!

I heard about a bug in IE that would require to preload the images
using a hidden div, but that didn't work. I see that google maps manage
to not having to reload the image and gets it from cache. What am I
doing wrong? This works perfectly in Firefox (i.e. it uses the cache
and calls the server just once). Code:

View 4 Replies View Related

Resizing And Caching Images On The Fly.

Nov 8, 2006

I have a function which caches images for a slideshow once the script has loaded. Here is an exerpt:

var base_ref = "http://www.example.com";
var images = new Array();
var tmp_images = new Array();
tmp_images[0] = "image1.jpg";
tmp_images[1] = "image2.jpg";
tmp_images[2] = "image3.jpg";
tmp_images[3] = "image4.jpg";
tmp_images[4] = "image5.jpg";

function cache_images () {
for (var i=0; i < tmp_images.length; i++){
var cacheimage=new Image();
var tmp_name = tmp_images[i];
var url = tmp_images[i] + ".png";
cacheimage.src=url;
images[tmp_name]=cacheimage;
}
}

As it is, the script whizzes through the for loop, and then moves on to the next function. The only trouble is that it moves on to the next function whilst it's still downloading the images from the server. Is there anyway to make the script wait until the downloading is completed, so that I can then go on to resize the images if it's needed?

View 2 Replies View Related

Possible To Stop Images Caching With JS?

Sep 1, 2011

I run a webcam streaming site, and has a gallery of images saved every hour every 24 hours, the thumbnails dont seem to change much (?) so wondered if there was a way to stop caching using a javascript . . . script? This is what im dealing with:

<!-- timeshots -->
<div id="Html4" style="position:absolute;overflow:auto;left:286px;top:557px;width:455px;height:180px;z-index:10">
<a href="[URL]" rel="lightbox" title="GardenCam at 12:00am"><img src="[URL]" /></a>
<a href="[URL]" rel="lightbox" title="GardenCam at 1:00am"><img src="[URL]" /></a>
<a href="[URL]" rel="lightbox" title="GardenCam at 2:00am"><img src="[URL]" /></a> .....

View 5 Replies View Related

Javascript Preloaders Not Caching

Nov 23, 2004

Can anyone help figure out why my javascript preloaders aren't preloading! Code:

the navigation section utilses simple js rollovers on the text options, with the onMouseRollover event loading an additional graphic image to the right of the menu. It appears almost instantaneously on broadband, but as I'm testing it on 56k and I'm trying to appease all users I required the navigation images to preload (especially those giving the description of the option).

They appear to preload fine in Netscape7 but not in IE6???

I won't list the entire source here apart from the following sections:: Code:

View 4 Replies View Related

Caching Of 'semi' Dynamic JavaScript (IIS, ASP, IE6)

Jul 23, 2005

We have a dynamically created javascript menu (from ASP), which is
customised per user (Have already taken all the static code out into
separate cached .js file)

The size of the 'dynamic' menu content can be as much as 10kB, and the
menu typically does not change for the duration of the user's session
- i.e. it would be nice to get the browser to 'cache' this. It is an
Intranet application, and is typically aimed at IE6 clients only.

Have considered the following strategies

1) Cookies - although the last thing I want is the whole menu coming
back to the server on every HTTP request - but would be useful IF
there is e.g. a header option the cookie to 'send' the cookie (Server
-> Browser) without the browser ever sending it back to the server
(but the browser still being able to 'read' the cookie?)

2) Creating 'dynamic' javascript files - i.e. send the output per user
to a mangled .js file (e.g. with a session ID in the filename), into a
cached js file. Would however need to cleanup the files quite
regularly, and giving IUSR file creation access doesn't seem a good
idea. Would then get the browser to include the JS by generating ASP
along the lines of.
<script language="JavaScript"
src="TempScripts/Menu<%=UserSession%>.js"></script>

Is there any other way?

Second Question : Is there any way to get IE to stop sending up the
HTTP REFERER header up to the server (e.g. RegKey) - this is pretty
pointless on an Intranet App (I know there is a way to do in
NetScape).

View 5 Replies View Related

JQuery :: Autocomplete With Remote And Caching?

Mar 31, 2011

How much data can be cached in the browser? My records seem to be about 70 characters from roughly 7 columns in my database.

View 4 Replies View Related

JQuery :: Browser Caching Textarea Value?

Jul 29, 2010

I have a textarea element, and a link action to empty the textarea.

$('.area').empty();

Normally it works fine. But after a ajax call to send the textarea value, the empty() stops working. I also tried text(), html(), none of them are working. The original text in the textarea still stays there. I have no way changing its value. My guess is firefox caches it or something.

View 10 Replies View Related

JQuery :: Turn Off Caching While Developing?

Aug 25, 2011

I am using vs2010 and when I hit ctr + F5 it launches which ever broswer I select to browse with and tells it not to use the cached version of that web page. But regardless if its chrome, firefox,IE, opera or safari,they all seem tohit a wall and stop recognizing my changes code tweaks. How do I resolve this frustration! It is very trouble some when testing .json file changes and css changes.

View 3 Replies View Related

JQuery :: IE Caching AJAX Requests?

May 14, 2009

It looks like IE is caching the response for some AJAX requests here. The app I'm working on is a catalog of sorts. Clicking the link for a category loads a set of "items". Those, in turn, may be deleted from the admin view. The delete works fine (I checked the DB) but, when loading the same set of category items, I'm seeing the list unchanged. That is, the thing that was deleted is still there. Sorry for the crap explanation but I'm not really sure of a better way of putting it. Bottom line is, has anyone seen this sort of behavior with IE before? Can it cache the result of an AJAX request like that? And, if so, how can I guard against that? Can I set cache-control headers for an AJAX request?

View 2 Replies View Related

JQuery :: IFrame Caching In Firefox?

Jun 5, 2009

I am using a jQuery script to insert iframe in the document after thepage load completes as follows:

jQuery(window).load(function() {
var container = jQuery(#container_id);
jQuery(<iframe id=my_iframe

[code]....

View 1 Replies View Related

JQuery :: Parsing And Caching JSON?

Nov 22, 2011

I am working on a web app that pulls content using multiple JSON files. I have tried numerous methods of parsing the JSON, but only the following has worked for me.

$(function() { $(document).ready(function() {
$.getJSON("new.json",function(data) {
$.each(data.posts, function(i,data){ var div_data ='<h4>'+data.title+'</h4><p>'+data.description+'</p>';

[Code].....

Ultimately I would like to somehow store the contents of the JSON files locally and swap out as new content is available. Unfortunately, I don't know how to do that. And possibly a method of using a more current version of jQuery to parse my JSON files?

View 1 Replies View Related

Setting The Src Attribute Using Script And Caching Images

Jul 27, 2005

I have noticed that when you set the src attribute of an img via script,
(instead of hard-coding in the img tag), although it caches the images,
if you leave the site and return, the browser has to re-cache the images.
Is that just the way it is, or is there a way to not lose the cache?

View 2 Replies View Related

JQuery :: Caching Selectors Inside JS Object?

Sep 26, 2010

I have a complex JS object. It manipulates the page DOM. Inside it I have many repetitive selections spread across functions. I would like to cache the selectors to enhance performance. How do other people do this? I can cache on the function level but not the object. When I try to cache on the object level I seemingly end up with stale selectors that while defined don't actually work.

My gut is that I can only cache on the function level?

what I have read does not deal with caching inside a JS object.

View 1 Replies View Related

JQuery :: IE Caching JSON From A Coldfusion Remote CFC

Sep 16, 2009

I'm using jQuery $.ajax or $.getJSON on document.ready to access data from the server through coldfusion remote cfc files.

My url looks something like this for the main page [url]

When i go to a new page i.e. [url]

The ajax functions are called but are not collecting new data (only in IE). IE caches the response and wont give me a new one unless I refresh the page, which I don't want to do.

Here's an example of a function I call. I've also tried $.getJSON with no success.

function getGrains() {

I've looked into ways to make sure IE wont cache files. Some of the popular suggestions are:

Add a random parameter to the url: I've done this:

Change get requests to posts: Done (see function)

Also, jQuery's cache:false doesn't work.

I'm not sure I can use the meta tags or header cache-control functions because it's not caching my html page, it just caches these HTTPRequests from within my javascript file, and they're not loading html, just json objects.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved