Page 1 of 1
Long URLs on a PC
Posted: Fri Nov 11, 2016 7:54 pm
by lohill
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
Re: Long URLs on a PC
Posted: Fri Nov 11, 2016 9:39 pm
by mwieder
Re: Long URLs on a PC
Posted: Fri Nov 11, 2016 10:04 pm
by FourthWorld
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.
Re: Long URLs on a PC
Posted: Fri Nov 11, 2016 10:46 pm
by lohill
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
Re: Long URLs on a PC
Posted: Fri Nov 11, 2016 11:01 pm
by FourthWorld
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.
Re: Long URLs on a PC
Posted: Fri Nov 11, 2016 11:33 pm
by lohill
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
Re: Long URLs on a PC
Posted: Sat Nov 12, 2016 12:08 am
by FourthWorld
Perhaps other links in those search results might be more satisfying?
This is what I see:
Re: Long URLs on a PC
Posted: Sat Nov 12, 2016 1:06 am
by mwieder
Re: Long URLs on a PC
Posted: Sat Nov 12, 2016 3:16 pm
by lohill
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
Re: Long URLs on a PC
Posted: Sun Nov 13, 2016 2:18 am
by FourthWorld
Does the URL load in Safari? I believe the browser engine LiveCode uses on Mac is that one, no?
Re: Long URLs on a PC
Posted: Sun Nov 13, 2016 2:47 am
by lohill
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
Re: Long URLs on a PC
Posted: Tue Nov 15, 2016 11:41 pm
by lohill
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
Re: Long URLs on a PC
Posted: Wed Nov 16, 2016 2:03 am
by mwieder
Larry-
No worries. I often do A/B testing that way and sometimes I actually remember to fix/restore things when I'm done.
