How to add Random number to URL ?
Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Thanks...
Re: How to add Random number to URL ?
FaRHaN wrote: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Why don't you just adjust your cache headers? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
Take a look at NonCachingImage. Witold Am Thu, 13 Aug 2009 00:44:07 -0700 (PDT) schrieb FaRHaN farhan.ba...@ymail.com: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Thanks... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
I have used all of the Cache Headers but they didn't work for me. Only 'Refresh' Meta tag works, but all other Tags (Cache-Control, Expires, etc.) not working in IE or FF. I don't know why... That's why i want to access page from Server rather than stored from the browser. ??? From: burnstone burnst...@burnstone.ch To: users@wicket.apache.org Sent: Thursday, August 13, 2009 12:46:50 PM Subject: Re: How to add Random number to URL ? FaRHaN wrote: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Why don't you just adjust your cache headers? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
How can i use this for every request ? As i want to generate a unique URL for every page (not for images), any examples ??? From: Witold Czaplewski witold-mail...@cts-media.eu To: users@wicket.apache.org Sent: Thursday, August 13, 2009 2:58:18 PM Subject: Re: How to add Random number to URL ? Take a look at NonCachingImage. Witold Am Thu, 13 Aug 2009 00:44:07 -0700 (PDT) schrieb FaRHaN farhan.ba...@ymail.com: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Thanks... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
This class modifies the src attribute of the img tag: ... protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String url = tag.getAttributes().getString(src); url = url + ((url.indexOf(?) = 0) ? : ?); url = url + wicket:antiCache= + System.currentTimeMillis(); tag.put(src, url); } ... Maybe you can do something similar with your links. Am Thu, 13 Aug 2009 01:15:48 -0700 (PDT) schrieb FaRHaN farhan.ba...@ymail.com: How can i use this for every request ? As i want to generate a unique URL for every page (not for images), any examples ??? From: Witold Czaplewski witold-mail...@cts-media.eu To: users@wicket.apache.org Sent: Thursday, August 13, 2009 2:58:18 PM Subject: Re: How to add Random number to URL ? Take a look at NonCachingImage. Witold Am Thu, 13 Aug 2009 00:44:07 -0700 (PDT) schrieb FaRHaN farhan.ba...@ymail.com: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Thanks... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
You request puzzles me. By default Wicket adds headers to every page that will make any decent browser written since 1996 not cache the page. What is your intention? Regards, Erik. FaRHaN wrote: How can i use this for every request ? As i want to generate a unique URL for every page (not for images), any examples ??? -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org