473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ot : safari post problem

Hi, although this is not strictly asp.net related, I was hoping that someone
could confirm or debunk what appears to be a major problem with safari
POSTs.

with the following html :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<base id="BaseTag" href="http://www.mysite.net/"></base>
</HEAD>
<body>
<form name="TheForm" method="post" id="TheForm">
<input type="submit" name="SubmitBtn" value="Submit"
id="SubmitBtn" class="btn" />
</form>
</body>
</html>

note that there is a base tag and no action for the form tag.
regradless of the page/url that this is located at :
http://www.mysite.net/page1.htm
http://www.mysite.net/section1/page1.htm
http://www.mysite.net/section1/page1.htm?x1=x1&x2=2

in safari the post is always to the site root : http://www.mysite.net
in all other browsers ( so far ) the post is to the current url

To work around this I have had to include the following code in the
Application_BeginRequest Method in Global.asax :

if ( Request.Method=="POST" && Request.Path="/Default.htm" )
Response.Redirect(Request.Headers["Referer"]);

this works since POST is not valid for the default root document, in this
case Default.htm

My guess is that safari is incorrectly applying the BASE tag contents to the
missing FORM action rather than just using the current url.

I haven't found any reference to this is bugzilla - has anyone encountered
this issue ?

Thanks
Gerry

Nov 19 '05 #1
1 1929
I was a little hasty with this post - the fix I included does in fact not
work, the redirect to the correct url simply causes another post to the root
document.
For now I have advised the client to install the latest version of mozilla
and forget safari altogether

I do have some debug logging the the Application_BeginRequest method ,
for both the initial & redirected POSTs the following values are set :
- Request.Headers["Referer"] = http://www.mysite.net/Section1/Page1.htm
- Request.Path=/Default.htm

Gerry
"gerry" <ge**@hotmail.com> wrote in message
news:uB**************@TK2MSFTNGP12.phx.gbl...
Hi, although this is not strictly asp.net related, I was hoping that someone could confirm or debunk what appears to be a major problem with safari
POSTs.

with the following html :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<base id="BaseTag" href="http://www.mysite.net/"></base>
</HEAD>
<body>
<form name="TheForm" method="post" id="TheForm">
<input type="submit" name="SubmitBtn" value="Submit"
id="SubmitBtn" class="btn" />
</form>
</body>
</html>

note that there is a base tag and no action for the form tag.
regradless of the page/url that this is located at :
http://www.mysite.net/page1.htm
http://www.mysite.net/section1/page1.htm
http://www.mysite.net/section1/page1.htm?x1=x1&x2=2

in safari the post is always to the site root : http://www.mysite.net
in all other browsers ( so far ) the post is to the current url

To work around this I have had to include the following code in the
Application_BeginRequest Method in Global.asax :

if ( Request.Method=="POST" && Request.Path="/Default.htm" )
Response.Redirect(Request.Headers["Referer"]);

this works since POST is not valid for the default root document, in this
case Default.htm

My guess is that safari is incorrectly applying the BASE tag contents to the missing FORM action rather than just using the current url.

I haven't found any reference to this is bugzilla - has anyone encountered
this issue ?

Thanks
Gerry

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: DU | last post by:
According to a recent post, it seems that Konqueror 3.1+ and Safari 1.1 support CSS3 opacity style property under a proprietary name: "Support for the CSS3 opacity (using -khtml-opacity)...
0
by: Josh Renaud | last post by:
I'm still trying to solve a problem I experienced in Safari. This is my second post on the subject. Here are the relevant links: page: http://www.joshrenaud.com/fredbear/contact2.html css: ...
2
by: JThomas | last post by:
Hello! I'm having trouble with a page apparently causing my client's Safari browser to time out. I don't actually have access to a Mac & Safari, and haven't been able to physically see this...
34
by: Simon Wigzell | last post by:
document...focus() will scroll the form to move the specified text field into view on everything I have tried it with except Safari on the MAC. The form doesn't move. Any work around? Thanks.
12
by: effendi | last post by:
I wrote the following function and tested it in MSIE, Firefox and Mac Safari, Works in all but the Safari. What can I do to rectify this? function processBackground(){ for (n=1;n<11;n++) { ...
8
by: dd | last post by:
Hi, I've discovered a scenario where Safari 1.3 (I need to make my stuff compliant with 1.3+) gets confused about the scope of local variables WITHIN functions that were created in dynamic...
1
by: tromton | last post by:
Hello all, I have a problem with a scrript in safari 3. in mozilla/firefox and opera the problem does not exist. what i try to do: I have a div element with overflow:auto. in the element i have...
3
by: Brad | last post by:
I have an aspx page that is sending pdf files to client browsers: it uses a filestream to read the pdf file and response.binarywrite to send content to the browser. This has worked great for years...
2
by: rudiedirkx | last post by:
Gents, I have a problem (only in Safari) with the onsubmit in webforms. This topic covers the same subject: http://bytes.com/topic/javascript/answers/166542-onsubmit-safari but not as detailed as...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.