Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Welcome to the Monastery
 
PerlMonks  

Re^2: Perlmonks 'Not logged in Error' - Proposal for fix (link render)

by tmharish (Friar)
on Jan 21, 2013 at 03:35 UTC ( #1014375=note: print w/ replies, xml ) Need Help??


in reply to Re: Perlmonks 'Not logged in Error' - Proposal for fix (link render)
in thread Perlmonks 'Not logged in Error' - Proposal for fix

If such a redirection is implemented, then the destination page probably also needs to re-issue a cookie

If we did this server side then anyone landing on perlmonks.org would get redirected to www.perlmonks.org and no one would ever login on perlmonks.org. We could make this a 301 permanent redirect.

I tend to prefer to fix the rendering over changing the text that users have entered. It automatically fixes old nodes and getting it wrong in some way doesn't leave garbage saved that then has to be found and cleaned up.

The only problem with this could be the additional load on the server. For each page rendered the code will have to additionally check :

$node_contents =~ s/(http:\/\/)?(www\.)?(perlmonks\.)(org|net|com)\/(. +*)/$1www.perlmonks.$4\/$5/g;


Comment on Re^2: Perlmonks 'Not logged in Error' - Proposal for fix (link render)
Download Code
Re^3: Perlmonks 'Not logged in Error' - Proposal for fix (load)
by tye (Cardinal) on Jan 21, 2013 at 06:58 UTC
    anyone landing on perlmonks.org would get redirected to www.perlmonks.org and no one would ever login on perlmonks.org.

    I realize that. Do you realize that there are already people with existing cookies from perlmonks.org?

    The only problem with this could be the additional load on the server.

    The device has yet to be invented that could notice that miniscule of a difference in server load.

    - tye        

      Do you realize that there are already people with existing cookies from perlmonks.org?

      We simply expire all active sessions and everyone logs back in ONE time.

      The device has yet to be invented that could notice that miniscule of a difference in server load.

      I have no idea what the current server loads are and what the exact site traffic is, not to mention the fact that I dont know how the current rendering is done so that was an uneducated guess on my part.

      Do you realize that there are already people with existing cookies from perlmonks.org?
      Uhm... so....? We're not using this solution because everybody with a cookie on perlmonks.org would have to login once more?
      The device has yet to be invented that could notice that miniscule of a difference in server load.
      There is the redirect solution. It doesn't cost anything and would work also for links posted somewhere else.

      There is the explicit-domain-cookie-solution. It doesn't cost very much cpu (just check the server host and decide which cookie domain); it only needs some code (I can't estimate since I don't know the existing code). It also works for links posted somewhere else.

      Still you favor the solution which costs the most cpu (and probably the most coding) and which only works for links posted on this site, because you think the load is not measurable? That's kindof like saying, as a european (or american, ...) I still want to drive my big car because it's of no use to save gas, there are much more cars in china, so if they don't save gas, I shouldn't either.

        I'm sorry that you have no clue about CPU load. But a redirect is not cost-free. It means that there are two page loads (with an attempt to make the first one have low expense, of course). That's actually a ton more CPU than the tiny addition in the middle of the existing code for rendering user content (and the total CPU for rendering user content is a rather tiny part of the server load for rendering a page).

        And that's even ignoring the extra CPU extravagantly wasted by CPU-guzzling bloated American-style browsers and all of the international network infrastructure that needs to be invoked for a second request! And some of that network gear will be located in poor countries that can barely afford such luxuries!

        Though I also see value in having perlmonks.org redirect to www.perlmonks.org

        Still you favor the solution which costs the most cpu

        Actually, I wasn't proposing only one solution and I actually had no comment at all (yet) on the cookie domain stuff.

        As for external links, there isn't a single external link on the internet that will result in me visiting PerlMonks "logged in". That is for security reasons. But... nevermind.

        Everybody getting their panties in a wad about CPU usage that will really be completely lost in the noise if you tried to measure it has made this whole thing fall into the category of "unfun" and so I'll go extravagantly waste my CPU somewhere else, now.

        - tye        

      Do you realize that there are already people with existing cookies from perlmonks.org?

      There are two ways to handle that: either don't redirect if the cookie is set, or simply force them to log in one more time.

      I really hope you don't take it as a reason not to act.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014375]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-04-18 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (464 votes), past polls