csierra
Posts: 123
|
Posted: 11/11/2010, 2:43 AM |
|
Hi all, I have a query to throw top 10 random records, to show on my front page; althought each time I run the query from the db I get different records (this is, the randomize is working fine at the db end) when connection this query as a grid datasourse I get the very same each time; I supposed it was a chache issue, so that is why I included
Response.CacheControl="public"
Response.AddHeader "Pragma", "public"
response.Buffer=false
response.expires=-1
But still no joy; does not work; I am wondering how to force a requery; let´s say on the beforeshow event, create an adodb.recordset and push it to the grid; how to? any ideas are welcome!
Thanks
_________________
Yes! I Can!!! |
|
|
Edd
Posts: 547
|
Posted: 11/11/2010, 3:58 AM |
|
This will not work all the time. IIS has to be set not to cache the site and even then, in my experience it is not 100%.
To stop caching try https instead of http - that is why a lot of sites use secure pages, they are not allowed to cache.
Good luck.
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
|
|
TheunisP
Posts: 342
|
Posted: 11/15/2010, 6:27 PM |
|
this is 99.9% chance of being a browser issue - you are seeing a cached page
in IE:
Tools > Internet Options > Browsing History button [Settings]
then make sure that for Check for newer versions - Every time I visit the webpage is selected
FF must have something similiar but cant remember it now
|
|
|
csierra
Posts: 123
|
Posted: 11/15/2010, 6:38 PM |
|
Thanks but is not the case; I have Firefox 3.6 and IE 8, same thing.
Thanks for your reply!
_________________
Yes! I Can!!! |
|
|
TheunisP
Posts: 342
|
Posted: 11/15/2010, 6:56 PM |
|
ok - let's see we know it is being cached somewhere, to try and save bandwidth perhaps - can it be something on the client PC or I suppose whoever your DSL connection provider is can also do a bit of caching to save them retrieving the file again
grabbing from some of my older projects I have:
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
and then this from MS: scary
http://support.microsoft.com/kb/222064/
ps. you are not using CCS caching?
|
|
|
lboeldt
Posts: 53
|
Posted: 11/15/2010, 8:07 PM |
|
One thing you can try is setting a query string parameter to the value of timer and placing that in your refresh link. That way each time the link is pressed a new page will be forced to generate. When combined with all of the "do not cache" headers this should give you what you a way to always get new content on the page.
|
|
|
TheunisP
Posts: 342
|
Posted: 11/15/2010, 11:36 PM |
|
thought the same thing - but this is is his homepage you don't have control over the link - unless you do a pass through go for say index.asp and then pass it on with a random number to a receiving page which is now your homepage
hacking it like this might not be the best, I'd rather find out who, what & why is doing it
|
|
|
lboeldt
Posts: 53
|
Posted: 11/16/2010, 4:42 AM |
|
You're right its not the best approach for a home page as it will generate lots of extra crawler traffic. What about using an AJAX callback to pull a new piece of content each time. Start the page with an embedded content table surrounded by a div with an ID that you assign then use an AJAX periodical updater (ala prototype.js) to grab a new version of the table at a specified interval.
|
|
|
TheunisP
Posts: 342
|
Posted: 11/17/2010, 11:03 AM |
|
cam you post the url perhaps
|
|
|
csierra
Posts: 123
|
Posted: 11/17/2010, 4:36 PM |
|
Thanks for your replies; the URL is http://huatulcosecreto.com where you can see at the right column a grid; this is the mentioned one. mean while I am trying the ' <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> ' tag, I´ll let you know. No ccs caching; no IPS issue I´ve used a couple (diff) ones.
Thanks Ill keep you all updated!
_________________
Yes! I Can!!! |
|
|
TheunisP
Posts: 342
|
Posted: 11/17/2010, 4:56 PM |
|
ok so in theory that list "Hoy en el KB de Ventas" should change each time I reload?
|
|
|
csierra
Posts: 123
|
Posted: 11/18/2010, 5:06 PM |
|
Thanks ThenuisP, yes, that is what should change with every hit to the homepage. Still no joy here...
_________________
Yes! I Can!!! |
|
|