Mauro,
I believe that some web servers cache the data based off of the URL, so by
adding a date/time stamp, it provides a unique URL and the server will not
cache the result. You could probably achieve the same thing by simply
adding a counter that increments every time your command is called, but
that is not quite as simple or easy as the date method.

Topher

On Mon, Feb 23, 2009 at 2:33 PM, Frigi <[email protected]> wrote:

>
> Hi Mitcho,
>
> it works! Thanks!
>
> The "?date=" is a variable of PHP or of jQuery?
>
> Do you know a website wit a description/documentation?
>
> Thanks (Grazie)
> Mauro
>
> On 23 Feb, 03:31, "mitcho (Michael 芳貴 Erlewine)" <[email protected]>
> wrote:
> > Mauro,
> >
> > A common solution is to add the date as a GET parameter so that it's
> > cached as a different resource each time... try this:
> >
> > var url = "http://www.teletext.ch/pics/{CHANNEL}/{PAGE}-01.gif";;
> > url = url.replace( /{PAGE}/g, page);
> > url = url.replace( /{CHANNEL}/g, channel);
> > var d = new Date();
> > url = url + '?date=' + d.getTime();
> >
> > Best,
> >
> > mitcho
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > I have created an Ubiquity command that load news in image format.
> >
> > > My problem is that in preview I become the cache image from browser
> > > and not the actually from the website.
> >
> > > How can I do to load every time the image?
> >
> > > The code of my command is there:
> http://frigi.ch/images/stories/file/txt.js
> >
> > > Thanks & Ciao
> > > Mauro
> >
> > > PS: Sorry for my bad English
> >
> > --
> > mitcho (Michael 芳貴 Erlewine)
> > [email protected]http://mitcho.com/
> > linguist, coder, teacher
> >
>


-- 
Topher Fangio
Software Developer
[email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to