Welcome Guest, Not a member yet? Register   Sign In
Problem clearing session value - function not executing
#11

[eluser]TheFuzzy0ne[/eluser]
Sorry, I must have misread your last post. I didn't see anything about you having cleared your browser cache. I must be going blind in my old age. Wink

Well, I learnt something new today. I had no idea a browser could/would cache a URL that simply redirected. Since no output is sent, what is there to cache besides headers? Weird... Or did the method originally output something before you decided to make it redirect? That could be where the cache was set.

You should find that you don't run into the problem again, unless you start changing how that method works. It's a problem that fairly common when developing Web applications. I use the Web Developer Extension for Firefox, which (among a ton of other things), allows you to disable caching whilst you're developing your app.
#12

[eluser]dlegatt[/eluser]
I think i found my problem. I should pay more attention to HTTP codes. 301 means Moved Permanently and the browser should be caching it.
I found a stack exchange thread recommending to use 307 for non-cached redirects instead.
#13

[eluser]TheFuzzy0ne[/eluser]
Excellent. Thanks for posting back with a solution. You've no doubt saved me a lot of future head-scratching, that's for sure. I've always just used a 301 status code for redirects. I won't be doing that anymore, that's for sure. xD




Theme © iAndrew 2016 - Forum software by © MyBB