Forums

RS-Linkify Thread is sticky

Quick find code: 261-262-33-65181208

Amaethwr
Aug Member 2008

Amaethwr

Posts: 14,634 Opal Posts by user Forum Profile RuneMetrics Profile
Hey Indy, thanks for the little mention :)

+ Congratz to the winners! Definitely God's and not your own :P

Think I might have gotten 3 pictures correct.. I remember choosing Neena, Infinity, and Moltare (he does have a cool voice..!), and maybe 1 or 2 of the Jmod/serial killer questions haha, clearly not enough of a smarty pants

Regarding the latest update's issue with logging out, could it potentially work like links and QFCs? Where the login session gets automatically changed to match our current one?
Selective Completionist

03-Nov-2015 13:55:29

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Hiya Blasty, interesting method.

I'm already using replaceState in combination with CSS so it may not be a big leap to take it further. What you suggest should work but I agree it's not as neat as I'd like. However it's worth thinking about.

Here's another way I thought of...

I need to set permission for history api (can be optional for those who don't want it)
- When logged in, save the session URL.
- Dump all forum history into an array.
- Modify all array items to include the current session URL. (even pages for whatever reason didn't have a session URL)
- Replace forum history with the modified array.
- When session URL changes (doesn't match the saved one) , repeat process.

This means the current method will work using mostly pure CSS. The only time there is processing to do is after login so it means overall it's lightweight. It also means if you were logged in and then continue to forum while not logged in, the history will update and continue to work.

It also means it could be extended to bookmarks. Meaning you remain logged in when using any bookmarked pages.

Love to know if you have any thoughts on this approach :)

03-Nov-2015 14:23:21 - Last edited on 03-Nov-2015 14:30:03 by Indecent Act

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Amaethwr said :
Hey Indy, thanks for the little mention :)

+ Congratz to the winners! Definitely God's and not your own :P

Think I might have gotten 3 pictures correct.. I remember choosing Neena, Infinity, and Moltare (he does have a cool voice..!), and maybe 1 or 2 of the Jmod/serial killer questions haha, clearly not enough of a smarty pants

Regarding the latest update's issue with logging out, could it potentially work like links and QFCs? Where the login session gets automatically changed to match our current one?

Hiya Amaethwr, sadly the QFC/link idea isn't enough because session ID is bound to the URL and the browser remembers every detail So when you have a new session URL it simply doesn't match the browsers history. If doesn't match it believes it's a completely new link.

03-Nov-2015 14:26:58

Morgan

Morgan

Posts: 36,054 Sapphire Posts by user Forum Profile RuneMetrics Profile
I'm not a Javascript expert but can't you save the thread URL every time I click on it as a String but without the User ID? These strings would be saved into a String array.

Again, I don't wanna sound silly, so if I do, tell me :D

But now that I think about it... I get the feeling the array wouldn't persist after closing Chrome.

Like... what I'm trying to say is the User ID is everchanging and kinda irrelevant in terms of working with history. You'll only care about the non-User ID part of it.

Or wait... WHAT ABOUT SAVING THE QFC instead of links? :D

Blah blah, never mind. Blah blah! :P

03-Nov-2015 15:33:31 - Last edited on 03-Nov-2015 15:42:32 by Morgan

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Here's a basic run down, forgive for going over things that may be obvious but it's better to have it all in one post, as this subject is discussed a little somewhere in the last 10 or 15 pages.

Within my addressbar on RSOF right now is this "c =o V2Ueu6L210"

All links on forum page contain that ID. My browser history contains links that contain the ID too.

Visited links are determined by browser history. So tomorrow when I log in the url will contain "c=somethingDifferent"

That means all links on the pages will not match what's in the browser history. Thus wont be treated as visited.

The idea is to have the browser do the work, rather than linkify. That's what it's doing currently though it's temporary due to the dynamic nature of the ID in the url. You can see the difference when the browser is taking care of this as the links are coloured well before linkify customises friends/clan/self text colours. It's really nice and fast.

Now if I were to save every link clicked, this causes a number of issues. It will end up a massive cache. I can't simply determine if the saved url target even exists and I can't make it expire as there are threads that are years old. So I have no idea how long to store this data or even if it's relevant. The browser handles all this reasonably well and it doesn't eat into local storage (which is also slow).

Then I have to cross-reference a potentially massive cache on every page load against 20 thread titles and 20 last posted links for forum sections. That's not something that I wish to do.

My idea that I mentioned at the top of this page, is update/modify all session IDs in the browser history, that way I can keep using the lightweight fast method that's in use now.

Forum history would only need to be updated when the session ID changes and I think it could work well. I'm running a script in the console right now checking it out.

Blasty's idea is heavier but also pretty good, and is preferred over caching.

03-Nov-2015 16:16:18 - Last edited on 03-Nov-2015 16:17:38 by Indecent Act

Quick find code: 261-262-33-65181208 Back to Top