Click to See Complete Forum and Search --> : to refresh or not to refresh...


Jackbob
11-22-2007, 05:46 AM
i've a little problem,
i've a page asp in two languages, when you choose a language, you go to a page which change a session variable in this way:
<%
Session("lingua")= "en"
Response.Redirect(Request.ServerVariables("HTTP_REFERER"))
%>
as you can see, you go back to the starting page.
The page is the same for the two language, the only change is the css included:
<% if language = "it" then %>
<link href="test/css/test.css" rel="stylesheet" type="text/css"/>
<% elseif language = "en" then %>
<link href="test/css/test_eng.css" rel="stylesheet" type="text/css"/>
<% end if
%>
But to see the change in the browser, i've to refresh the page... how i can force the refresh? Or how i can resolve the problem in a better way?
Thanks

yearbass
11-25-2007, 11:20 AM
try to not cache the page by using this code at the top of your page(or before any response.write/html output).

<%
Response.AddHeader "Cache-Control","No-Cache"
Response.AddHeader "Pragma","No-Cache"
Response.Expires = -1000
%>

Jackbob
11-25-2007, 01:36 PM
Thanks a lot,
i will try this solution, but i am afraid that it could affect the search engine position...
am i wrong?

yearbass
11-25-2007, 10:31 PM
i don't think so. but it just not cached by browser not by search engine (i guess)