When creating a site that requires a user to login to gain access, so far it seems to me that there's 2 common ways to set it up:
- Use Apache's Basic authentication (using htpasswd, and .htaccess and .htpasswd files -- and even Apache::Htpasswd).
- Use something like CGI::Session along with cookies (CGI::Cookie).
If your site doesn't require anything persistent beyond just remembering that the user is logged in, what are the reasons for choosing one of the above methods over the other?
I understand that, as soon as you start needing some persistent state (like, keeping track of a user's shopping cart), then you need to go with something like option 2... But, are there circumstances where you'd use both of the above options together?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|