[OpenLayers-Users] Re: 'Pragma: no-cache' in OpenLayers WMS
getMap request
Diego Guidi
diegoguidi at gmail.com
Thu Nov 24 11:24:42 EST 2011
I'm not sure to understand your problem, but if you need to avoid
client caching of your requests you can easily manage this stuff using
redraw(true)
http://dev.openlayers.org/docs/files/OpenLayers/Layer/HTTPRequest-js.html#OpenLayers.Layer.HTTPRequest.redraw
as an alternative you can modify the url adding a random string at the
end, somethung like wmsurl&123456.
you can easily manage this task with mergeNewParams
http://dev.openlayers.org/docs/files/OpenLayers/Layer/HTTPRequest-js.html#OpenLayers.Layer.HTTPRequest.mergeNewParams
actually redraw(true) uses mergeNewParams to do it's stuff.
so, you can add a listener to layer.loadstart event and call redraw(true).
Diego Guidi
On Thu, Nov 24, 2011 at 5:10 PM, Jan Henrik Øverland
<janhenrik.overland at gmail.com> wrote:
> And I don't have any meta tags like
> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
> in my HTML.
> Jan
>
> On Wed, Nov 23, 2011 at 14:02, Jan Henrik Øverland
> <janhenrik.overland at gmail.com> wrote:
>>
>> Hi,
>> I have WMS overlays (source http://iridl.ldeo.columbia.edu) in my GIS
>> application (built on ExtJS, Mapfish, OpenLayers). It works, but the
>> overlays do not seem to show up any faster after the first load and the
>> Chrome inspector confirms that. So I talked to the guys at columbia.edu and
>> they say that they can se 'Pragma: no-cache' in my getMap requests.
>> My WMS layers are created like this:
>> new OpenLayers.Layer.WMS(
>> <name>,
>> <url>,
>> {
>> layers: <layers>,
>> transparent: true,
>> format: 'image/png'
>> },
>> {
>> isBaseLayer: false,
>> buffer: 0,
>> ratio: 1,
>> singleTile: true
>> }
>> )
>> How can I control the Pragma parameter? It is obviously not provided in
>> the base url.
>> Jan
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
More information about the Users
mailing list