2) var timestamp = new Date().getTime(); then add to the url of the gml-file:
url += '?' + timestamp; so the server request looks something like this: http://your-server.com/XML1/file.gml?123455564 1) first, you should check the caching directives in order to disable them. with IE you're installing the ieHTTPHeaders-plugin, display the output window, and then type in the url of your gml-file in the location field of your browser. then you see something like this: (your request) GET http: //www.google.de/intl/de_de/images/logo.gif HTTP/1.0 Accept: */* Referer: http://www.google.de/ Accept-Language: de UA-CPU: x86 Proxy-Connection: Keep-Alive [...] (the answer of the server) HTTP/1.0 200 OK Date: Mon, 07 Sep 2009 08:40:24 GMT Content-Length: 9121 Content-Type: image/gif Expires: Tue, 07 Sep 2010 08:40:24 GMT Cache-Control: public, max-age=31536000 Proxy-Connection: keep-alive Last-Modified: Wed, 07 Jun 2006 19:40:07 GMT look at the cache-control section. it says the your browser is allowed to cache the file for 31536000 seconds. if you have something similar to this, check your webserver configuration and documentation (!) to avoid this. greets, Tobias -------------------------------------------------------------- Hi, Thanks for your reply. So how to do the following: 1) change the cache settings on your webserver for the XML1 subdir (tell the browser to never cache the file)? 2) append a random number to the url? Pls tell in details. Regards. Bart van den Eijnden (OSGIS)-2 wrote: > > Hi, > > you are probably running into browser cache. So either change the cache > settings on your webserver for the XML1 subdir (tell the browser to never > cache the file), or append a random number to the url. > > Best regards, > Bart > >> >> Dear Friends, >> >> I am having a query builder which allows an user to select one feature at >> a >> time. >> The geometry for this feature is then populated into a GML file format >> using >> another xml. >> So every time an user selects one feature the GML file is deleted and a >> new >> one created with the geometry of the new feature. >> >> Although GML file is created with every change in selection Openlayers is >> unable to load the changed GML and show it on the map. >> >> So openlayers is able to display the data from the GML for the first time >> only. So from second and subsequent selection it shows only the first >> feature on the map. >> >> The code is: >> >> map.addLayer(new OpenLayers.Layer.GML('choice_features', >> "XML1/FeatureGML.xml")); >> >> Is it a bug? >> If not how to tackle the problem. >> >> Thanks in advance. >> -- >> View this message in context: >> http://n2.nabble.com/Layer-from-GML-loading-only-for-the-first-time-tp35 96382p3596382.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Layer-from-GML-loading-only-for-the-first-time-tp35 96382p3596762.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users