Browser problems?

Bringing your stacks to the web

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
GregWills
Posts: 69
Joined: Sun Aug 30, 2015 7:51 am

Browser problems?

Post by GregWills » Wed Sep 27, 2017 12:58 am

Hi All

Has anyone noticed that there is a problem running HTML5 programs lately?

Yesterday I went to upgrade a web based program and found that when I tested it (from the desktop) it did not load (I have used it for over a year, so I know that the program works). I was using Safari, so I tried Google Chrome. Still not loading. I tried Firefox and it loaded.

I then made a very simple stack (two buttons, one text field on one card) and tested it. Same results. Safari - no, Chrome - no, firefox - yes.

Any suggestions? My concern is that all HTML5 built programs may be running into the same issue?

Cheers
Greg

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Browser problems?

Post by [-hh] » Wed Sep 27, 2017 6:45 am

To run HTML5 standalones, *latest* Safari+Chrome+Opera need now a (local) server due to a strict "same-origin-policy". Firefox will probably follow soon.
shiftLock happens

GregWills
Posts: 69
Joined: Sun Aug 30, 2015 7:51 am

Re: Browser problems?

Post by GregWills » Thu Sep 28, 2017 12:05 am

Ahhh, thanks -hh

Hmmm, now the next question is how do I set up a local server on a Mac. I haven't needed to do this before, and I can't seem to find references to do this on a Mac (I did see one for windows though).

Hopefully this isn't too difficult, as it is critical that these programs are tested before they are inserted into a website (not administered by me).

Thanks in advance.

Greg

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Browser problems?

Post by [-hh] » Thu Sep 28, 2017 1:30 am

The simplest one is the python solution from the HTML5 Guide/Dictionary:
Open a terminal window, change directory to your standalone's directory(*), and run:
python -m SimpleHTTPServer 8080
This will let you access your standalone by opening your web browser and visiting http://localhost:8080 (**)
____
(*) In case you don't use terminal regularly, here a simple way.
Open terminal, type "cd " (incl. the space) and drag the standalone's directory to the terminal window, then hit enter/return, type or paste the python line, hit enter and you are done as long as your machine is up. (If you are testing repeatedly, so that each time a new folder is created, then go one folder up and run python in there.)
(**) In case you are new to this.
By script: launch url (http://localhost:8080/<yourStandalone>.html)
OR
use only launch url (http://localhost:8080/) and click the .html file in the displayed listing.

[On Mac I personally use the free MAMP (then you have to save/move your files in/to the htdocs directory inside MAMP, can be done by script).]
Last edited by [-hh] on Thu Sep 28, 2017 2:14 am, edited 1 time in total.
shiftLock happens

GregWills
Posts: 69
Joined: Sun Aug 30, 2015 7:51 am

Re: Browser problems?

Post by GregWills » Thu Sep 28, 2017 2:13 am

Thanks again -hh

I'll give it a go.

GregWills
Posts: 69
Joined: Sun Aug 30, 2015 7:51 am

Re: Browser problems?

Post by GregWills » Thu Sep 28, 2017 4:47 am

Thanks for walking me through that -hh

Success, and I can sleep at night again!!!

Cheers
Greg

Onlyzen
Posts: 2
Joined: Fri Jul 21, 2017 12:36 pm
Location: United States

Re: Browser problems?

Post by Onlyzen » Tue Nov 07, 2017 10:24 am

i think you update your browser

niconiko
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Jul 17, 2006 2:28 am
Location: Motegi, Japan

Re: Browser problems?

Post by niconiko » Wed Aug 29, 2018 3:38 am

To update --hh's advice and the LC doc's (plus for my own future reference) ...

1. To set the Python path on Windows, either:
C:\Python[version number]
C:\Users\(Your logged in User)\AppData\Local\Programs\Python\Python[version number]
(For even more deail, visit [url]https://www.pythoncentral.io/add-python ... l-command/[/url] .)

2. To start Python from the terminal window:
py -m http.server 8080

3. To close Python:
(in the terminal window) ctrl + c

Post Reply

Return to “HTML5”