Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

[Resolved] Web links in HTML5 games in the app should open in the default web browser

A topic by Pixievolt No. 1 created Dec 28, 2023 Views: 1,023 Replies: 5
Viewing posts 1 to 6
(1 edit) (+1)

I have some HTML5 games I'm working on porting to Itch and making sure they work in the Itch app. They use <a> links for things like unintrusive self-promo, crediting authors of used resources, getting the source code if it's open-source, etc. Presently, those links open in the game window, which is very suboptimal - the user ought to have access to their bookmarks/logins/etc.

I've tried target="_blank" on both <base> and <a>, as well as window.open; they're all no-ops. Ideally the app should detect links to http(s):// URLs and open them in the default browser. Until then, I'll intercept clicks on them, copy their URLs to the clipboard, and tell the player "go paste in your web browser".

I have this problem as well. Using <a href="_blank"> to a site with https, and it’s a no-op. It’s important for the narrative that the link work. I think this did work when my game was first released but of course there’s no way for me to be sure.

This might MIGHT be working as intended? (It's not unthinkable for a nefarious dev to point a user to an automatically loading website with a javascript payload. At the very least, they can get the user's IP and/or digital thumbprint of OS/image-display-resolution/timezone.)

We will need to wait and see from official sources.

PWA apps are banned by Safari and Mozilla and solution is to use local web server for end user or other workaround which is bad idea when browser don't want local files for security or other reasons.

solution may be running itch --appname but this seems broken.

I tried things in Kitch, and found that http(s):// links do open in the default browser there! target="_blank" and window.open are still no-ops, which is a little weird, but I can work with that, and we can call this resolved as soon as the Kitch launcher becomes the Itch launcher.

Fixed in the Itch 26.1.9 update! Thanks~