Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.redirect and refresh 1

Status
Not open for further replies.

Larnoc

Programmer
May 13, 2003
3
NZ
Am hoping this is another simple one command fix

Basically Page A allows the user to upload a photo (company logo etc) what I want then is for the user to be taken to their company page right afterward, the response.redirect command does this ok, but it's not refreshing when it does so.

For instance you upload a new logo, click the go button, then it does the uploading thing and flicks you over (via the response.redirect) to your company page, where your old logo is still displayed (from cache) until you hit F5 or click refresh, at which point the new one comes up.

any help on this would be hugely appreciated, thanks

 
The absolute easiest way to do this would be to cheat :)

If you embed a querystring in the address your directing them too, it will automatically load a fresh copy of the page. The easiest way to do this and keep it relatively random would be to use some portion of the date:
Code:
Response.Redirect "yourpage.asp?complexFakery=" & day(now) & hour(now) & minute(now) and second(now)

Or you could just simplify it to use a random number:
Code:
Randomize
Response.Redirect "yourpage.asp?complexFakery=" & Rnd * 1000000

or you could go through all your pages and set them to no-cache and so on so that the borwser chooses to reload the page each time they visit.

-Tarwn

01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101
29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
This is what I put at the top of pages that I want to be shown fresh each time instead of from what was stored in a client-side cache:

<%
Response.Expires = -1000 ' Make browser not cache pg.
%>


Best regards,
J. Paul Schmidt - Freelance ASP Web Developer
- Creating &quot;dynamic&quot; Web pages that read and write from databases...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top