Different access in Firefox and browser widget

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

TorstenHolmer
Posts: 57
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Different access in Firefox and browser widget

Post by TorstenHolmer » Wed Jan 26, 2022 12:03 pm

Hi,

my goal is to get the text of a url via the browser widget.

When I access thes following url with Firefox or another browser I can see the whole page.
https://www.zeit.de/green/2022-01/klima ... ettansicht

When I set the url of the browser widget to this url I get the information that this page is only viewable for subscribers.

Has anyone an idea how the get around this access restriction? Since it is viewable in a normal browser the page content is free, or?
Does it has to do with the useragent properties?

Cheers,
Torsten

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Different access in Firefox and browser widget

Post by richmond62 » Wed Jan 26, 2022 2:11 pm

Are you a subscriber?

If you are the subscription cookie will be in your Firefox settings somewhere.

LiveCode will not be able to access the subscription cookie.
-
SShot 2022-01-26 at 15.09.04.png
-
SShot 2022-01-26 at 15.09.35.png
-
Just had a look using BRAVE:

https://brave.com/

TorstenHolmer
Posts: 57
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Re: Different access in Firefox and browser widget

Post by TorstenHolmer » Sat Jan 29, 2022 3:03 pm

Hi,

in order to show the effect I created a simple stack which uses the browser widget and ha s a button opening the same url in the local browser: https://www.dropbox.com/s/28nvlcjqyp9a2 ... ecode?dl=0

You should see that in the LC-App window the access to the page is restricted and in your local browser you can see the whole page. At least, this is what I can seee on my Mac.

Can anyone replicate this oberservation?

Cheers,
Torsten

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Different access in Firefox and browser widget

Post by richmond62 » Sat Jan 29, 2022 4:52 pm

Mac OS 12.2 RC1

Stack:
-
stack.jpg
-
Brave browser:
-
BRAVE_browser.jpg
-
Safari browser:
-
SAFARI_browser.jpg
-
Very Odd Indeed.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Different access in Firefox and browser widget

Post by richmond62 » Sat Jan 29, 2022 5:00 pm

Firefox browser:
-
FireFox_browser.jpg

TorstenHolmer
Posts: 57
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Re: Different access in Firefox and browser widget

Post by TorstenHolmer » Sun Jan 30, 2022 12:04 pm

Hi,

thanks for testing but you have to get one clock further. The first dialog is just if you want to enter the free mode, so you have to click the left button. BUT then the view of the page is different. In the local browsers you get access to the whole page while in the app the page is blocke for non-subscribers.

I have recorded the phenomenon and created a small stack:

Video: https://www.youtube.com/watch?v=jUhKqK6rjQM
Stack: https://www.dropbox.com/s/28nvlcjqyp9a2 ... ecode?dl=0

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Different access in Firefox and browser widget

Post by richmond62 » Sun Jan 30, 2022 12:48 pm

Stack:
-
SShot 2022-01-30 at 13.45.42.png
-
Brave:
-
SShot 2022-01-30 at 13.46.10.png
-
Safari:
-
SShot 2022-01-30 at 13.46.59.png
-
אין בעיה

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Different access in Firefox and browser widget

Post by jacque » Sun Jan 30, 2022 6:40 pm

LiveCode uses the OS default browser for its web view widget, which on Mac is Safari. You should see the same thing in your stack and in Safari. Other browsers may render the page differently but the widget doesn't use those.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Different access in Firefox and browser widget

Post by richmond62 » Sun Jan 30, 2022 7:50 pm

the OS default browser
I'll bet I'm not the only person who uses a Macintosh and prefers a different browser, and has set that as default.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Different access in Firefox and browser widget

Post by jacque » Sun Jan 30, 2022 8:08 pm

richmond62 wrote:
Sun Jan 30, 2022 7:50 pm
the OS default browser
I'll bet I'm not the only person who uses a Macintosh and prefers a different browser, and has set that as default.
I prefer a different browser too, but the widget uses the Mac's WebKit framework which is pretty much required if you want an embedded web view.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

TorstenHolmer
Posts: 57
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Re: Different access in Firefox and browser widget

Post by TorstenHolmer » Sun Jan 30, 2022 8:12 pm

Please scroll down at bit more in the stack-window in order to see the subscriber notice. The current screenshot of the stack shows the top of the page only which is identical in all views ;-)

In Safari the page can be viewed wihtout a restriction.

Is it possible that the widget uses a useragent string which is not what the site expects?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Different access in Firefox and browser widget

Post by jacque » Sun Jan 30, 2022 10:53 pm

If the useragent is the problem, you can set that in the widget but I don't know what the value should be. I do get the correct page after I click the left button in Safari.

It may be a problem with the javascript on the page, but I don't know enough to detect the issue.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

TorstenHolmer
Posts: 57
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Re: Different access in Firefox and browser widget

Post by TorstenHolmer » Tue Feb 01, 2022 8:35 am

I found the reason of the different views:

The problem is the browser cache! Somehow something went wrong in the access of this page (maybe some cookie) and there is data stored in the cache which results in the restricted access behavior. When I create a standalone, it has its own new browser cache and everything is fine :-)

The interesting question is now: how to reset the cache of the Livecode IDE?


Since all IDEs (community and paid versions) on a machine seem to use the same browser cache (this is what I observe), there has to be one place where the widget gets its cookies from.

Does anyone knows more about this?

Cheers,
Torsten

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Different access in Firefox and browser widget

Post by jacque » Tue Feb 01, 2022 7:08 pm

You can avoid the caching problem by making each URL request unique. Add a timestamp at the end:

https://www.zeit.de/green/2022-01/klima ... ?time=<the seconds>

Change the seconds on each request. The page will ignore the extra parameters.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

TorstenHolmer
Posts: 57
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Re: Different access in Firefox and browser widget

Post by TorstenHolmer » Sun Feb 06, 2022 4:50 pm

Hi Jaqueline,

the URL trick does not change the cache for the cookies. I have to re-install the IDEs in order to get rid of the cookie, I think.

Post Reply

Return to “Internet”