Flyertalk can't seem to remember last viewed post
#121
Join Date: Sep 2010
Location: SFO
Posts: 886
I've had this problem for several weeks now... seems to be related to upgrading to FF5.
The feature is not working properly on two office computers running FF5. Works fine on IE7 on those same computers, as well as Chrome on my home computer.
The feature is not working properly on two office computers running FF5. Works fine on IE7 on those same computers, as well as Chrome on my home computer.
#122
FlyerTalk Evangelist
Join Date: Jul 2006
Location: Upper Sternistan
Posts: 10,047
I'm sure IB can see how many of us are Mac and how many PC, but I'd wager that there's a pretty decent Mac presence here. Especially with MacBooks for travelling, and the generally affluent nature of this board, I think Macs are probably over-represented compared to general sales numbers.
#123
Moderator, Southwest Airlines and Choice Privileges
Join Date: Mar 2008
Location: Central Texas
Posts: 3,039
Example:
http://www.flyertalk.com/forum/showthread.php?goto=newpost&t=1231886
redirected to:forum/../1231886...html#post16675245,
the last post (at the time) and the only one I had not yet read.I then clicked the -new-post.html link for the same thread and was taken to:
forum/../1231886...html#post16660107,
a post that it is three days old, precedes a post I made on the thread, and that is seven posts prior to the one I just read using the old style link!That suggests the problem is in the communication between vbSEO (or the custom FT code?) and core VB?
Would an option be to revert the new-post links to the old style, but add the nofollow tag? (The nofollow tag might actually be superfluous; a guest with no cookies doesn't see any -new-post.html links anyway, so perhaps the bots never see them either.)
I'm not a real JavaScript coder (I just play one on FT for the benefit of myself and the rest of the RR forum) so I'd be pokey at putting it together...but it seems a user-side fix would be a GreaseMonkey script to rewrite the -new-post.html URLs to the old style. If nothing else, that would help more quickly collect enough data to confirm or disprove the conclusion suggested by my small sample size results.
Could your proximity to the server be a factor?
#124
Moderator, Southwest Airlines and Choice Privileges
Join Date: Mar 2008
Location: Central Texas
Posts: 3,039
Here is a user-side fix in bookmarklet form:
I only tested the bookmarklet once and on only one browser, but while slogging through figuring out the required code I did complete several more tests of the old-style URL, so far without the URL failing to function as expected.
As with all bookmarklets, it has to be applied anytime the page it affects changes. Therefore, if it is not already your practice, you should Ctrl-click or shift-click all -new-post.html links.
The bookmarklet uses jQuery (already used by FT), so it will take a bit more work to convert the bookmarklet to a GreaseMonkey script than otherwise, but I'll post that when it is available.
ETA: I don't access FT threads via MyFlyerTalk, so it hasn't been tested there. It should work, but let me know if it doesn't.
Code:
javascript:(function(){var a='http://www.flyertalk.com/forum/showthread.php?goto=newpost&t=', b=$('a[href$="new-post.html"]'),i,u,t;b.each(function(h){u=b[h].href;i=u.lastIndexOf('/')+1;t=u.slice(i,i+7).replace(/[^0-9]/g,'');u=a+t;b[h].href=u ;});}())
As with all bookmarklets, it has to be applied anytime the page it affects changes. Therefore, if it is not already your practice, you should Ctrl-click or shift-click all -new-post.html links.
The bookmarklet uses jQuery (already used by FT), so it will take a bit more work to convert the bookmarklet to a GreaseMonkey script than otherwise, but I'll post that when it is available.
ETA: I don't access FT threads via MyFlyerTalk, so it hasn't been tested there. It should work, but let me know if it doesn't.
Last edited by ftnoob; Jul 5, 2011 at 2:27 pm Reason: As noted
#125
Join Date: Aug 2006
Location: DCA / WAS
Programs: DL 2+ million/PM, YX, Marriott Plt, *wood gold, HHonors, CO Plt, UA, AA EXP, WN, AGR
Posts: 9,388
OK I got really annoyed at it today & tried something that worked for me. It's really kludgy & we still need to find a better fix, but see if this works until IB can find a better fix:
Clear your browsing cache. In FF, you do this by going to tools>options>advanced>network and punch the "Clear Now" button in the offline storage section (next to the line that reads "Your cache is currently using xxx.x MB of disk space").
I've tried it this afternoon & the results seem repeatable. After you clear cache, the "go to next unread" works correctly. I cleared cache, read the new posts in thread (correctly handled), exited thread, additional new posts were made, went to read new posts without clearing cache & it took me to something I already read..... exited thread, cleared cache, additional new posts were made in thread & accessing the "read new posts" function worked correctly after clearing cache.
If it works for others, then we need to figure out why the cache isn't being cleared like it used to after the database pointer is updated.
Clear your browsing cache. In FF, you do this by going to tools>options>advanced>network and punch the "Clear Now" button in the offline storage section (next to the line that reads "Your cache is currently using xxx.x MB of disk space").
I've tried it this afternoon & the results seem repeatable. After you clear cache, the "go to next unread" works correctly. I cleared cache, read the new posts in thread (correctly handled), exited thread, additional new posts were made, went to read new posts without clearing cache & it took me to something I already read..... exited thread, cleared cache, additional new posts were made in thread & accessing the "read new posts" function worked correctly after clearing cache.
If it works for others, then we need to figure out why the cache isn't being cleared like it used to after the database pointer is updated.
#126
Join Date: Sep 2005
Location: Lafayette, CO, USA
Programs: SPG Lifetime Plat, AA Gold, UA Gold, DL Silver, HH Gold, Vail Epic
Posts: 9,096
In FF5.0 on Win7:
If I clear my cache (Tools menu > Options > Advanced Tab > Network Tab > Clear Now button), then the links function correctly for me. Of course, I later need to clear my cache again as new links/pages get cached.
Edited to add: Looks like Global_Hi_Flyer and I were going through this around the same time. Is there something that can be done to tell the browser not to cache these?
If I clear my cache (Tools menu > Options > Advanced Tab > Network Tab > Clear Now button), then the links function correctly for me. Of course, I later need to clear my cache again as new links/pages get cached.
Edited to add: Looks like Global_Hi_Flyer and I were going through this around the same time. Is there something that can be done to tell the browser not to cache these?
#127
Moderator, Southwest Airlines and Choice Privileges
Join Date: Mar 2008
Location: Central Texas
Posts: 3,039
Here is the GreaseMonkey script to change the -new-post.html links to the old style:
Code:
// ==UserScript== // @name Workaround for FlyerTalk First Unread Post problem // @author wnProTips // @namespace http://www.flyertalk.com/forum/members/ftnoob.html // @description Changes all URLs of the form -new-post.html to the old style: showthread.php?goto=newpost&t=1234567 // @license Creative Commons Attribution License // @version 1.0-b // @released 2011-07-05 // @updated // @include http://www.flyertalk.com/forum/* // ==/UserScript== window.addEventListener('load', function (e) { var $=unsafeWindow.jQuery, a='http://www.flyertalk.com/forum/showthread.php?goto=newpost&t=',b=$('a[href$="new-post.html"]'),i,u,t; b.each(function(h){ u=b[h].href;i=u.lastIndexOf('/')+1; t=u.slice(i,i+7).replace(/[^0-9]/g,''); u=a+t; b[h].href=u; }); } ,false);
#128
Ambassador: Alaska Airlines
Original Poster
Join Date: Jul 2009
Location: Seattle
Programs: AS MVP Gold
Posts: 2,732
The comments about clearing the cache resolving the issue got me thinking, so I did a little data-gathering.
The process by which a browser navigates to the last unread post has been explained above, but I wanted a closer look at the traffic to see if something funny was occurring. The fact that the newest browsers are affected would seem to indicate that as the browsers are becoming more and more standards-compliant, incorrect or outdated behaviors are being exposed.
First, a little background. When a browser requests a web page, the server can respond all sorts of different ways. If the page doesn't exist, many people are familiar with the "404 Page Not Found" error code. If it exists and everything is fine, the server responds with "200 OK" and the contents of the page. There are actually many such codes which are grouped into series: 200-series indicate success, 500-series indicate server error, etc.
The 300-series response codes are interesting, and as a group, categorized as the redirect responses. This generally means the client (browser) has made a request, the server understands it, but the server wants the client to look elsewhere for the content. FT employs a 300-series request when redirecting the browser from the new-post "magic" link to the actual post. Let's take a look at the raw request and response for a problematic thread:
Starting from my My FlyerTalk page, I click on the First Unread Post icon next to a thread title I'm interested in. In this case, it's the AS Newbie thread, which I generally track whenever I'm online. Here's the request headers my browser sends. Note that this is the new-post "magic" link:
Now here's what flyertalk.com sends back: a pointer to a showthread page identifying a specific post ID. This response basically boils down to "I understand what you want, but it's not here. Please ask for it at this new address."
The client immediately makes a new request for this showthread page. Here's the browser asking flyertalk for the new page it was told to look at (some cookie values redacted for privacy and brevity):
Showthread.php basically takes a post ID and generates a search-engine friendly URL. The server responds with yet another redirect:
The client accepts this new address and makes a 3rd and final request for the page it wants:
Finally, the server responds with the actual page content the user cares about. Only the headers are presented here, but the content is delivered immediately following:
Now some analysis. The reason the 300-series codes are so interesting here is that the different codes have different meanings. Lots of info on Wikipedia, but the one FT uses is 301 Moved Permanently. As the description indicates, 301 Moved Permanently is useful when a page used to be located in one place, but has a new permanent home somewhere else. It's an easy way to tell a client "look somewhere else," but in this case, it's wrong, because this response code really means "look somewhere else, and don't come ask me again, because the answer will always be the same." As defined in the RFC: "This response is cacheable unless indicated otherwise."
All this means that when a user clicks on a new-post "magic" link, FT is responding with a URL to specific post, and specifically indicating to the browser that it CAN and SHOULD save that answer for later. So later, when that thread comes up again in your My FlyerTalk, modern browsers will default to their cached values instead of taking the time to round-trip to the server. This is good design as it allows the browser to save one entire unnecessary round-trip, which can speed up the browsing experience significantly.
So what's the fix? Well, FT has already figured it out. Examining closely the responses above, you can see the other 2 responses from FT (including one other 301 response) both include specific directives to the client to not cache the results. These are the 3 relevant lines:
I would expect that if FT added these no-caching directives to the new-post magic redirector, the issue would be resolved. Alternatively, the new-post magic redirector could be adjusted to use a more appropriate redirect response that does not suggest the client cache the results. 307 Temporary Redirect is probably the suitable option here.
Edit: Here's the post that explains this behavior is new in IE9 that basically confirms my analysis above. The problem is definitely with FT's implementation of 301 response code, and is only just now being exposed by new efficient browsers.
The process by which a browser navigates to the last unread post has been explained above, but I wanted a closer look at the traffic to see if something funny was occurring. The fact that the newest browsers are affected would seem to indicate that as the browsers are becoming more and more standards-compliant, incorrect or outdated behaviors are being exposed.
First, a little background. When a browser requests a web page, the server can respond all sorts of different ways. If the page doesn't exist, many people are familiar with the "404 Page Not Found" error code. If it exists and everything is fine, the server responds with "200 OK" and the contents of the page. There are actually many such codes which are grouped into series: 200-series indicate success, 500-series indicate server error, etc.
The 300-series response codes are interesting, and as a group, categorized as the redirect responses. This generally means the client (browser) has made a request, the server understands it, but the server wants the client to look elsewhere for the content. FT employs a 300-series request when redirecting the browser from the new-post "magic" link to the actual post. Let's take a look at the raw request and response for a problematic thread:
Starting from my My FlyerTalk page, I click on the First Unread Post icon next to a thread title I'm interested in. In this case, it's the AS Newbie thread, which I generally track whenever I'm online. Here's the request headers my browser sends. Note that this is the new-post "magic" link:
Code:
Request GET /forum/alaska-airlines-mileage-plan/1142410-alaska-airlines-newbie-lounge-ask-your-questions-here-flame-free-new-post.html HTTP/1.1 Accept text/html, application/xhtml+xml, */* Referer http://www.flyertalk.com/forum/usercp.php Accept-Language en-US User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) Accept-Encoding gzip, deflate Host www.flyertalk.com
Code:
Response HTTP/1.1 301 Moved Permanently X-UA-Compatible IE=7 Location http://www.flyertalk.com/forum/showthread.php?p=16671657#post16671657 X-Cnection close Content-Type text/html; charset=UTF-8 Content-Length 20
Code:
Request GET /forum/showthread.php?p=16671657 HTTP/1.1 Accept text/html, application/xhtml+xml, */* Referer http://www.flyertalk.com/forum/usercp.php Accept-Language en-US User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) Accept-Encoding gzip, deflate Host www.flyertalk.com Connection Keep-Alive Cookie BIGipServerflyertalk_POOL=REDACTED; vbseo_loggedin=yes; BIGipServerflyertalk_POOL=REDACTED; bbsessionhash=REDACTED; base_domain_REDACTED=flyertalk.com; bblastvisit=REDACTED; bblastactivity=0; comettrail=REDACTED; _ibcvc=93; bbuserid=REDACTED; bbpassword=REDACTED; sev=REDACTED; _ibcv=93
Code:
Response HTTP/1.1 301 Moved Permanently Date Tue, 05 Jul 2011 22:25:22 GMT Server Apache Expires 0 Cache-Control private, post-check=0, pre-check=0, max-age=0 Pragma no-cache X-UA-Compatible IE=7 Set-Cookie sev=REDACTED; expires=Thu, 15-Sep-2011 15:02:14 GMT; path=/; domain=.flyertalk.com Location http://www.flyertalk.com/forum/alaska-airlines-mileage-plan/1142410-alaska-airlines-newbie-lounge-ask-your-questions-here-flame-free-17.html#post16671657 X-Cnection close Content-Type text/html; charset=ISO-8859-1
Code:
Request GET /forum/alaska-airlines-mileage-plan/1142410-alaska-airlines-newbie-lounge-ask-your-questions-here-flame-free-17.html HTTP/1.1 Accept text/html, application/xhtml+xml, */* Referer http://www.flyertalk.com/forum/usercp.php Accept-Language en-US User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) Accept-Encoding gzip, deflate Host www.flyertalk.com Connection Keep-Alive Cookie BIGipServerflyertalk_POOL=REDACTED; vbseo_loggedin=yes; BIGipServerflyertalk_POOL=REDACTED; bbsessionhash=REDACTED; base_domain_REDACTED=flyertalk.com; bblastvisit=REDACTED; bblastactivity=0; comettrail=REDACTED; _ibcvc=93; bbuserid=REDACTED; bbpassword=REDACTED; sev=REDACTED; _ibcv=93
Code:
Response HTTP/1.1 200 OK Date Tue, 05 Jul 2011 22:25:22 GMT Server Apache Expires 0 Cache-Control private, post-check=0, pre-check=0, max-age=0 Pragma no-cache X-UA-Compatible IE=7 Set-Cookie sev=REDACTED; expires=Thu, 15-Sep-2011 15:02:14 GMT; path=/; domain=.flyertalk.com X-Cnection close Content-Type text/html; charset=ISO-8859-1
All this means that when a user clicks on a new-post "magic" link, FT is responding with a URL to specific post, and specifically indicating to the browser that it CAN and SHOULD save that answer for later. So later, when that thread comes up again in your My FlyerTalk, modern browsers will default to their cached values instead of taking the time to round-trip to the server. This is good design as it allows the browser to save one entire unnecessary round-trip, which can speed up the browsing experience significantly.
So what's the fix? Well, FT has already figured it out. Examining closely the responses above, you can see the other 2 responses from FT (including one other 301 response) both include specific directives to the client to not cache the results. These are the 3 relevant lines:
Code:
Expires 0 Cache-Control private, post-check=0, pre-check=0, max-age=0 Pragma no-cache
Edit: Here's the post that explains this behavior is new in IE9 that basically confirms my analysis above. The problem is definitely with FT's implementation of 301 response code, and is only just now being exposed by new efficient browsers.
#129
Join Date: Aug 2006
Location: DCA / WAS
Programs: DL 2+ million/PM, YX, Marriott Plt, *wood gold, HHonors, CO Plt, UA, AA EXP, WN, AGR
Posts: 9,388
I would expect that if FT added these no-caching directives to the new-post magic redirector, the issue would be resolved. Alternatively, the new-post magic redirector could be adjusted to use a more appropriate redirect response that does not suggest the client cache the results. 307 Temporary Redirect is probably the suitable option here.
Edit: Here's the post that explains this behavior is new in IE9 that basically confirms my analysis above. The problem is definitely with FT's implementation of 301 response code, and is only just now being exposed by new efficient browsers.
Edit: Here's the post that explains this behavior is new in IE9 that basically confirms my analysis above. The problem is definitely with FT's implementation of 301 response code, and is only just now being exposed by new efficient browsers.
#130
Join Date: Apr 2003
Location: MSY
Programs: BA GfL
Posts: 5,929
Did the clear cache thing on FF 5.0 and it is still not working (today I got the worst new posts list ever, with "new" posts all the way back to June 22, all of which I have already looked at, of course).
Could someone at IB please fix this damn thing already? Especially now that baliktad has done the work for you?
Could someone at IB please fix this damn thing already? Especially now that baliktad has done the work for you?
#131
Join Date: Feb 2009
Posts: 959
I'm working to find an elegant solution to this.
#132
Join Date: Apr 2009
Location: Phoenix, AZ
Programs: SW Rapid Rewards, Hilton Honors, Marriott, Avis First
Posts: 4,831
I am glad I found this thread as this problem was driving me crazy.
For my part, I have FF 5.0 on my desktop and FF4.0 on my laptop and both are having the same problem.
So, this morning, I cleared by cache and cookies and it worked, but when I got home, it took me back to a 7:00 AM post even though there were other posts made after it that I read. So, I cleared the cache and cookies again. It then moved me to the last afternoon posts I read. So far, so good.
Logged off to have dinner and returned, launch the browser, clicked a thread and ... BAH.. back to the 7:00 AM post reference above.
Keeping my fingers crossed that you can resolve this soon.
Thanks!
For my part, I have FF 5.0 on my desktop and FF4.0 on my laptop and both are having the same problem.
So, this morning, I cleared by cache and cookies and it worked, but when I got home, it took me back to a 7:00 AM post even though there were other posts made after it that I read. So, I cleared the cache and cookies again. It then moved me to the last afternoon posts I read. So far, so good.
Logged off to have dinner and returned, launch the browser, clicked a thread and ... BAH.. back to the 7:00 AM post reference above.
Keeping my fingers crossed that you can resolve this soon.
Thanks!
#133
FlyerTalk Evangelist
Join Date: May 2001
Location: MSY; 2-time FT Fantasy Football Champ, now in recovery.
Programs: AA lifetime GLD; UA Silver; Marriott LTTE; IHG Plat,
Posts: 14,518
Thanks!
If the solution still requires us to do a one-time cache clear to get rid of the already cached redirects, can I suggest that once it's implemented, you post an Announcement at the top of the forums to let folks know the required step? This problem seems pretty widespread and yet many users probably never check this sub-forum.
If the solution still requires us to do a one-time cache clear to get rid of the already cached redirects, can I suggest that once it's implemented, you post an Announcement at the top of the forums to let folks know the required step? This problem seems pretty widespread and yet many users probably never check this sub-forum.
#134
Moderator, Southwest Airlines and Choice Privileges
Join Date: Mar 2008
Location: Central Texas
Posts: 3,039
I did some looking and discovered things like:
- FF has been caching 301 responses since version 3.5, so that is not new;
- FF 4 and FF 5 have the exact same info cached for -new-post.html magic URLs;
- 301 Redirects: The Horror That Cannot Be Uncached
Viewing the details of the traffic we can see things like:
Code:
11:19:41.640 Status: pending GET http://www.flyertalk.com/forum/southwest-rapid-rewards/1230034-chase-rapid-reward-points-did-anyone-not-get-theirs-transferred-new-post.html 11:19:41.696 Status: 301[Moved Permanently] GET http://www.flyertalk.com/forum/showthread.php?p=16635962#post16635962 11:19:42.890 Status: 200[OK] GET http://www.flyertalk.com/forum/southwest-rapid-rewards/1230034-chase-rapid-reward-points-did-anyone-not-get-theirs-transferred.html#post16635962
Edit: Here's the post that explains this behavior is new in IE9 that basically confirms my analysis above.
After reading the nearly-simultaneous posts by Global_Hi_Flyer and sc flier, I would have laid big money that such was the case!
ETA: left unexplained by these analyses are the upthread reports of this problem occuring in FF 4.x. I'm inclined to think those are erroneous reports, but I could be mistaken.
Last edited by ftnoob; Jul 5, 2011 at 9:41 pm
#135
Ambassador: Alaska Airlines
Original Poster
Join Date: Jul 2009
Location: Seattle
Programs: AS MVP Gold
Posts: 2,732
10.3.2 301 Moved Permanently
The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.
The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.
I'm not sure if you're asking me or IB-Dick, but there are several specific changes that are possible here. I suspect the easiest one is to adjust the magic new-post PHP to write some explicit no-cache headers, which is why that's the one I recommended. The ideal solution would be to move away from 301 altogether, as a permanent redirect is never intended here. So rather than giving some instructions and then immediately nullifying them, just start out with the proper instructions. Either HTTP 302 or HTTP 307 seems to be the proper response for this case:
10.3.8 307 Temporary Redirect
The requested resource resides temporarily under a different URI. Since the redirection MAY be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.
The requested resource resides temporarily under a different URI. Since the redirection MAY be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.
I have seen both 302 and 307 mentioned, but this is exactly the direction I was going. The -new-post.html (which as previously noted should not normally be seen by a bot) should receive a "temporary redirect" response, then the old-style .php URI should receive the 301 "permanent redirect" response. To my untrained eye, that should take care of the problem. Perhaps even take care of it in an elegant fashion.
For a dynamic site like FT where pages are all generated on the fly, these types of redirects should really be handled with HTTP 302/307 response codes, along with an explicit no-cache directive to ensure that the intent is clear to the browser: these redirects are ephemeral and may change at any time. Do not cache the resulting links. Always ask the server, and you will always get the right behavior.