Log in

View Full Version : How to force page reload after redirect ?


mihai11
08-31-2007, 08:23 AM
Hi,

I have developed a custom page that has a different navbar for authenticated users and for non-authenticated users (the authenticated users get more options). Now, the problem is that after logging in, the user is still presented with the old navbar (the navbar for non-authenticated users). The user must reload the page in order to see the navbar for authenticated users. How can I fix this ?

I wouldn't want to disable the cache, because this page is going to be quite popular. Is there a better option ? It would be great to be able to specify somehow that after the redirect, the page that must be loaded should be taken from the server and not from cache. Is this possible ?

Regards,
Razvan

djdonx
08-31-2007, 08:30 AM
Would you want it so that everytime someone visits the page it refreshes or just after someone logs in :S

<body onload="window.setTimeout('window.location.reload()',1000) ;">

I found you a Java refresh script that refreshes the page after one second..

Hope thats what you meant

mihai11
08-31-2007, 11:09 AM
Would you want it so that everytime someone visits the page it refreshes or just after someone logs in :S

<body onload="window.setTimeout('window.location.reload()',1000) ;">

I found you a Java refresh script that refreshes the page after one second..

Hope thats what you meant

The page only needs to be reloaded after login in, so that the correct navbar is displayed. Your solution seems to continuously refresh the page after 1000 miliseconds.

Even if it could be made to work to refresh the page *only* after login, I still don't like this solution very much because the user will get a chance to see to old page for a second then that page will be reloaded without his request. This might be annoying for some users.

djdonx
08-31-2007, 11:45 AM
Make it a shorter time length then?