[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 575
  • Last Modified:

Safari and CFLOCATION

I have a typical coldfusion app with a bunch of CFCASE statement which I use to render different iterations of the page, execute specific functions etc..etc..  It works fine in IE and firefox.  But for some reason safari is rendering the following error message:

"Too many redirects occurred trying to open page. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page."

For some reason it has a problem with my CFLOCATIONs.  Anybody knows what the deal might be with this piece of garbage browser?
0
xamian
Asked:
xamian
  • 4
  • 3
  • 2
  • +1
1 Solution
 
Andrew MaurerCommented:
not sure... I really haven't done anything with Safari.. but what if you append a url variable at the end of your request? so maybe you can fool it to think that it isn't the same page.

just to confirm.. you are saying addToken="no" on your cflocation tags right?
0
 
SidFishesCommented:
almost always a code problem related to endless loop redirect (as the message says)

I test with Safari and have not seen this as an -issue- ...except when it's -my- error

probably due to some variable not being set which controls your cflocation and not cflocation/safari itself.
0
 
Andrew MaurerCommented:
Interesting Sid... but Xamian said it works fine in IE and FF ?

But... how many cflocations are we talkin about? Is there a more efficient way to handle what you are doing?
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
SidFishesCommented:
could -be- an issue with safari (setting variables, cookies etc)...just doubt it's cflocation as I use it all the time with no issue
0
 
erikTsomikSystem Architect, CF programmer Commented:
do you cfflush somewhere
0
 
xamianAuthor Commented:
Maybe 20 cflocations, you know the typical stuff
if blah cflocation back to form with a few extra url variables kinda like this
<cflocation url="?Trg=3&submission_id=#Form.submission_id#&topic_id=#Form.topic_id#&original_submission_id=#Form.original_submission_id#&quote=#Form.quote#&er=1">
 It's only safari that has this problem.
0
 
SidFishesCommented:
<cflocation url="?Trg=3&submission_id=#

that's not your actual url call is it??

needs to be at least
<cflocation url="somepage.cfm?Trg=3&submission_id=#

if not

<cflocation url="http://www.site.com/somepage.cfm?Trg=3&submission_id=#

0
 
xamianAuthor Commented:
Yea I usually leave out the page name. Is that a problem?
0
 
SidFishesCommented:
never seen it done like that efore

might be with Safari ;)

according to docs proper usage is a full url including http:// you -can- get by with relative urls in some cases but it's never a sure thing...and probably has a lot to do with how browsers handle url

i'm guessing safari is -stricter-
0
 
xamianAuthor Commented:
Sid's right.  This happened to me before I remember now.  Safari is very unforgiving about URLs in CFLOCATION.  At the very least you need a file name, but probably should enter a full url.  Once I put the full url Safari stopped whining about too many redirects.  
Thanks for the help.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now