Long URLs on a PC

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm
Location: San Diego, CA USA

Long URLs on a PC

Post by lohill » Fri Nov 11, 2016 7:54 pm

I am having problems with long URLs in the browser that are getting truncated to exactly 2083 characters when pasted into an instance of the browser. The same problem does not exist in a Mac. In essence it boils down to the fact that I can use revBrowserSet where the URL has more than 2,083 characters and then turn right around and use revBrowserGet and the resulting URL I get has 2,083 characters. This appears to happen whether or not I use LC 7.1.3 or LC 8.1.1.

I am attaching a 4 card stack with some sample URLs for anyone who wants to try. The top field contains the actual long URL to test and the field below shows the original length of the URL followed by the truncated length. The two lines below that show the last few characters of the truncated line and the last few characters of the line before truncation. Why the number '2083' is a mystery to me.

These long URLs that are getting truncated do not get truncated when pasted into the regular Chrome browser on a PC and the backtes will run successfully. On a Macintosh bot Safari and revBrowser can handle the URLs.

Thanks for any insights.
Larry
Attachments
Long URLS.zip
Sample URLs for testing
(4.47 KiB) Downloaded 224 times

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Long URLs on a PC

Post by mwieder » Fri Nov 11, 2016 9:39 pm


FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Long URLs on a PC

Post by FourthWorld » Fri Nov 11, 2016 10:04 pm

Based on the info you provided here I did a search in Google for "url length limit in chrome", and found this discussion that include:
In theory it should be unlimited, However in practise, most of the Http Clients or Browsers are limited to 2083 characters of Url Length.
http://stackoverflow.com/questions/1509 ... me-browser

The links included there may provide more details.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm
Location: San Diego, CA USA

Re: Long URLs on a PC

Post by lohill » Fri Nov 11, 2016 10:46 pm

Thanks Mark and Richard,

I guess that number 2083 is real and has some significance but that doesn't explain to me why those long URLs run in regular Chrome in both the PC and Mac. It seems to me that the LiveCode people have not quite gotten their act together on their revBrowser libraries. Chalk up one more flaw in LC but they won't do anything about except move on to another version. (short rant)

Larry

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Long URLs on a PC

Post by FourthWorld » Fri Nov 11, 2016 11:01 pm

Did you read the links provided by the others at the page I linked to? The comments on that page suggest they may be helpful.

If a browser has a limit of 2083 characters in the URL, I'm not sure there's anything any other program, LiveCode or anything else, could do to reach into that browser and change that limit.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm
Location: San Diego, CA USA

Re: Long URLs on a PC

Post by lohill » Fri Nov 11, 2016 11:33 pm

Yes, Richard, I did read your links and I found nothing helpful to explain why it is possible to run a 4,000+ character length URL in native Chrome on both a Mac and a PC and yet you cannot run it in revBrowser on a PC. That clearly says to me that the LC browser libraries on the PC side are not up to snuff.

Larry

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Long URLs on a PC

Post by FourthWorld » Sat Nov 12, 2016 12:08 am

Perhaps other links in those search results might be more satisfying?

This is what I see:
Attachments
Screenshot-2016-11-11.png
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Long URLs on a PC

Post by mwieder » Sat Nov 12, 2016 1:06 am

Screen Shot 2016-11-11 at 4.03.57 PM.png

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm
Location: San Diego, CA USA

Re: Long URLs on a PC

Post by lohill » Sat Nov 12, 2016 3:16 pm

Mark,

Explorer is not part of this question. I have known for years that it had limitations with long URLs. That is undoubtedly one of the reasons why LC incorporated Chrome in their browser libraries.

Richard,
Have you tried to run one of those long URLs in the Chrome browser (or FireFox for that matter)? It will load and run successfully. This is not the case if you use the revBrowser library commands on a PC. You can however use those libraries on a Mac and get those URLs to run. This indicates to me that the libraries have a bug. A bug report has been filed and it is #18836.

Larry

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Long URLs on a PC

Post by FourthWorld » Sun Nov 13, 2016 2:18 am

Does the URL load in Safari? I believe the browser engine LiveCode uses on Mac is that one, no?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm
Location: San Diego, CA USA

Re: Long URLs on a PC

Post by lohill » Sun Nov 13, 2016 2:47 am

Yes.
Which leads me to a question. If my application needs to run on both a Mac and a PC is it necessary to include both the Browser and the Browser (CEF) libraries when making a standalone?

Larry

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm
Location: San Diego, CA USA

Re: Long URLs on a PC

Post by lohill » Tue Nov 15, 2016 11:41 pm

Mark and Richard,

I owe you both apologies. In preparing a simple stack to demonstrate the problem for Panos, I embarrassingly discovered that in my program I had commented out the statement with revBrowserOpenCEF and replaced it with revBrowserOpen. I changed it back to revBrowserOpenCEF and the long URL problem disappeared. I now have a new problem and had forgotten why I had done the commenting out in the first place.

The new problem manifests itself again only on a PC but works fine on a Mac. The new problem is that with revBrowserOpenCEF loaded with one of my long URLs the browser does not have any scroll bars and it is limited to how far you can scroll down or to the right using the track pad. As a result I am not able to access the Run Backtest button at the bottom of the screen. Can you suggest a solution for this?

I have included another stack for testing. Once the stack is open in the ide, open the browser sub stack. Then paste one of my long URLs into the address bar of the browser and press the go button. On a PC you should see no scrollbars and not be able to scroll to the bottom or all the way to the right.

Thanks,
Larry
Attachments
Long URLS_scroll.livecode.zip
Test on PC displays the problem
(24.4 KiB) Downloaded 222 times

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Long URLs on a PC

Post by mwieder » Wed Nov 16, 2016 2:03 am

Larry-

No worries. I often do A/B testing that way and sometimes I actually remember to fix/restore things when I'm done. :P

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”