Forum Moderators: phranque

Message Too Old, No Replies

Can a decision about a ssi affect later downloads?

Can a.com/a.shtml including b.txt cause a.com/b.shtml to include c.txt?

         

4thePegeh

9:05 pm on Mar 16, 2007 (gmt 0)

10+ Year Member



A client calls abc.com/def/xyz.shtml

If the time is an odd second, then xyz.shtml does an ssi to call content A with layout 1.

If the time is an even second, then xyz.shtml does an ssi to call test content B with layout 2.

The clients served the respective versions do not know that others are served a different version of xyz,shtml.

The above I have figured out how to make happen. Now the rub is that if I am testing two layouts, then when the client uses an internal link on xyz.shtml to call a different file within the same directory, ex. abc.com/def/mno.shtml they may get served the other layout due to calling the second file mno.shtml on an even second rather than an odd second. Just as xyz.shtml based it's content on the second called, so too would mno.shtml. That would mean that they would go from the lovely yellow three column layout called when the first file was called in an odd second, to the lovely two color blue layout when the second file is called in an even second. Not good for user experience.

Any suggestions for what I sould read about to learn how I may be able to ensure that everyone who calls their first file from the domain on an odd second and subsequently requests different files, receives only the version of those files that include in themselves the lovely yellow three column layout associated with initial odd second calls?

Ideally, without using cookies?

[edited by: 4thePegeh at 9:06 pm (utc) on Mar. 16, 2007]

jdMorgan

12:29 am on Mar 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just make two versions of the included file, and modify the link on the page based on whether it was called on an odd or even second.

Ideally, you should set a server variable on the first odd/even decision, and then use that variable for every subsequent decision, rather than checking the time again... Doing so could result in what is sometimes called "glare" because the time-seconds could change while the page was loading. So, it's important to only check the time once, set a variable such as "abPage=A", and use that variable until the current HTTP transaction is completed.

Jim

4thePegeh

12:50 am on Mar 17, 2007 (gmt 0)

10+ Year Member



Ok, thank you again. I think I understand what you are suggesting.

My reading indicates an "HTTP transaction" starts when the browser tries to download abc.com/def/xyz.shtml and ends when the server delivers it.

If I understand what I have read correctly, then your solution would work for decisions involving a number of include decisions all relating to the request and response relating to abc.com/def/xyz.shtml.

Would your solution also solve the second problem of carrying over the original time set variable to the subsequent and independent request for abc.com/def/mno.shtml

abc.com/def/mno.shtml is not to be included in abc.com/def/xyz.shtml

abc.com/def/mno.shtml is a page called after the person has read what they want from abc.com/def/xyz.shtml and then clicked on a link in abc.com/def/xyz.shtml to request abc.com/def/mno.shtml

I am trying to make things work out so that once someone arrives at the web site on an odd second and therefore sees the yellow layout for the page they arrived at, all subsequent pages they view on the website also serve the yellow layout rather than sometimes serving the blue layout associated with even seconds. I want the initial decision about whether to serve yellor or blue layout to carry over to all web pages subsequently called while the visitor is at the web site.

I realize the log file can record their ip address and the time they initially arrived. Perhaps that information could be used? But I have nto figured out how that information could be used to affect a number of subsequent file requests by the same visitor. Most of what I understand from what I have read suggests everything works only for the particular http transaction as defiend as started with the a request for xyz.shtml and ended with its delivery, rather than carrying information over to subsequent unincluded requests for mno.shtml

[edited by: 4thePegeh at 12:58 am (utc) on Mar. 17, 2007]

jdMorgan

1:36 am on Mar 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It looks like your best bet is to use a cookie, because that is the easiest way to carry information throughout a "session" comprising multiple HTTP transactions.

Either that, or put up two copies of the site, with links modified as needed to do the A/B testing, and the version selected when the visitor first requests the home page (which would be duplicated as well, with the odd/even second selecting a redirect to the A/B copy needed. You could use a script or mod_rewrite to implement this selection.

Jim

4thePegeh

1:45 am on Mar 17, 2007 (gmt 0)

10+ Year Member



OK

Thank you very much.

Cookies education appears to be in my future, and those who turn them off will be in for an unusual visit.

If the second option with the duplicate sites would involve duplicate urls due to the matching pages being in different directories (one for odd second entry and another for even), then cookies may be preferable, unless the urls were rewritten some way.

Will have to read up on both options and decide.

Thank you again for the guidance.

[edited by: 4thePegeh at 1:46 am (utc) on Mar. 17, 2007]

4thePegeh

5:40 am on Mar 18, 2007 (gmt 0)

10+ Year Member



Here is a work around that completely avoids the cookies issue:

Rather than alternate layouts based on odd and even initial second of commencement of http session, I could alternate them based on odd and even date of each individual http transaction.

The layout alternates daily. The only confusion caused is if someone is in an http session on the site over the midnight date change.

If daily alternatives run for a couple of weeks, it should alternate the layouts over days of unusual periods such as fridays and weekends.

My statistics seem to suggest only 1 in 10 currently revisit the site (although I understand that may be misleading due to firewalls not returning cookies). If so, and excluding the fire wall possibility, it may mean that about 5% would experience a different layout the second visit.

So, this may be a viable non-technical, non-cookie solution, useable while I get the testing up and running to test the testing.

[edited by: 4thePegeh at 5:43 am (utc) on Mar. 18, 2007]