[webkit-help] Fw: Webkit chops the URL with character "#" ?

y w ytrac00 at yahoo.com
Fri Feb 8 07:02:25 PST 2013

Hi Guillaume,
Great appreciate to you!!! You are right, if I enable javascript, it work perfect in Linux GTK. I learn something!!!
Another issue come, the Cocoa project I am testing load page from a proxy server, when I enable javascript it looks have cross domain problem for the AJAX. Do you know how to enable the cross domain access in webview settings? 
Again, thanks in advance!

--- On Thu, 2/7/13, Guillaume B <guillaume at bienkowski.fr> wrote:

From: Guillaume B <guillaume at bienkowski.fr>
Subject: Re: [webkit-help] Fw: Webkit chops the URL with character "#" ?
To: "y w" <ytrac00 at yahoo.com>
Cc: webkit-help at lists.webkit.org
Received: Thursday, February 7, 2013, 3:52 PM

That's because the browser _will_ chop this part of this URL.
'#' is a reserved part of the URI scheme, after which all characters are considered as a "fragment id", which is _never_ sent to the website. This part of the URL stays local to the browser.

Actual websites using this scheme as a way to navigate must use a Javascript code, executed on the client side, that will load the correct content through AJAX.

I tested in a Qt5.0.1 WebView (QML), and I have no problem loading your URL.

So, wild guess here, do you have Javascript enabled in your webview?

On Thu, Feb 7, 2013 at 8:37 PM, y w <ytrac00 at yahoo.com> wrote:

--- On Thu, 2/7/13, y w <ytrac00 at yahoo.com> wrote:

From: y w <ytrac00 at yahoo.com>
Subject: Webkit chops the URL with character "#" ?

To: webkit-help at lists.webkit.org
Received: Thursday, February 7, 2013, 2:35 PM

Hi All,
I found issue of processing URL: I create a simple webview and load page from a url string, it works fine for most given urls but not good for  http://money.cnn.com/m/#!/2013/02/06/news/economy/postal-service-cuts.json?category=Latest%20News.

if I encode the url as http://money.cnn.com/m%2F%23%21%2F2013%2F02%2F06%2Fnews%2Feconomy%2Fpostal%2Dservice%2Dcuts%2Ejson%3Fcategory%3DLatest%20News

it will give another error page.I got always the page  http://money.cnn.com/m which is home
 page of the news not the exactly article page. But if I input the full url in any browser(Safari, Firefox, chrome) it works fine.It seams the url been chopped from "#" character by webkit.

This happen for both Mac and Linux: I am using the night dump WebKit-r116865, tested with Cocoa application(iMac),  Ubuntu 12.04  GTK. 
Does any one know why?



webkit-help mailing list

webkit-help at lists.webkit.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20130208/7cbb6a8d/attachment.html>

More information about the webkit-help mailing list