Swedish charactors not displaying correclty in Safari browser - javascript

I am working on a react project which supports the Swedish language as well.
When I open the web app in the Chrome browse.
This is the expected behavior and this is correct.
But then I open the same link in the Safari web browser.
The top two dots for the letter a are not placed correctly.
index.html file contains this line also
<meta charset="utf-8" />
How do I fix this error?
Any help thanks in advance.

Related

webbrowser has stopped displaying web page

i need your help.
I use webbrowser in my delphi applications for displaying map.
For unknown reason it has stopped working in all my apps from yestarday.
All my application were working without issues for years.
Example code in delphi:
WebBrowser1.silent := true;
WebBrowser1.Navigate('c:\temp\test.html');
Example content of test.html:
<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<html>
<head>
<script src="https://api.mapy.cz/loader.js"></script>
<script>Loader.load()</script>
</head>
<body style="margin: 0px;">
<div id="mapa" style="width:1900px; height:1160px;"></div>
<script type="text/javascript">
var stred = SMap.Coords.fromJTSK(1077766.44,675681.75);
var mapa = new SMap(JAK.gel("mapa"), stred, 19);
mapa.addDefaultLayer(SMap.DEF_BASE).enable();
</script>
</body>
</html>
I have tried start my delphi apps on different computers with same result - it does not work on any computer, test web page is not displayed.
I have tried create new test application in Delphi 10.4 CE and in Turbo Delphi 2006 too, in both cases same result - test.html is not displayed in webbroser at all. I can open another web pages in webbrowser for example google.cz.
So it seems to me issue may be with test.html content, but same html file is possible to open in browsers like MS Edge, Opera etc. from same computer without any issues...
Now i'm little lost, because I'm not big expert I would appreciate advise how I can solve this issue.
Thanks
The reason why the mentioned map is no longer showing in TWebBrowser is the fact that TWebBrowser is just a wrapper for Internet Explorer. And since with the last update to the map software support for Internet Explorer 11 (latest version of IE available) has been dropped it means that TWebBrowser is no longer capable of showing the said map properly.
You can read more in Map API change-log here
So I'm afraid you will have to replace the TWebBrowser component in your applications either with TEdgeBrowser which is available from Delphi 10.4 or newer or make use of CEF4Delphi which is an open sourced Delphi component for chromium based browser.
You can read more about TEdgeBrowser and how to set it up in Delphi documentation

Chrome-extension in production looks different than in development. WHY?

Im creating an Angular2 Chrome-extension App.
It looks great when I created it in production.
However, this is how it looks when I upload it as a chrome-extension in development mode (Look at the logo and buttons).
The logo SHOULD be 75px (which it is in development), however in production it decides to be 87px even if the chrome tools tell me its 75px...
The same happens with the buttons.
Am I doing something wrong?
I did add the
<meta name="viewport" content="width=device-width, initial-scale=1.0">
tag.
It seems like chrome is taking over control of the viewport?
Check out your 'zoom' setting in Chrome. (CTRL+MOUSESCROLL)
Check out zoom settings on chrome and also make sure your font size is displayed in px and not em's since somehow chrome extensions do not replicate em size as they are in development.

Mark of the Web is not working in IE 9

I'm getting the warning message internet explorer restricted this webpage from running scripts or activex controls while opening our application in IE 9. I have tried adding Mark Of the Web as described in some online resources. Even if it is not showing the message when we open the page, it's popping up when we refresh the page.
This is the starting of my html file.
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html lang="en">
How can we avoid this message without changing the settings manually ?
It seems IE is very temperamental: if you use a line ending other than CRLF then it silently ignores the Mark of the Web (it's as if they're trying to wind up developers).

Is there some default popup for appstore download on itunes when webapp is viewed in mobile safari?

I've seen the same popup across multiple websites when viewing a site in safari on iphone. For example viewing wunderlist.com and vsco.co yield the same popup when viewed on iphone on safari prompting the user to download the app. Is this something baked into safari or is this a plugin? Maybe they are built from scratch but it seems like several sites are using the same popup....
Yes, there is and it's based on a meta tag.
<meta name="apple-itunes-app" content="app-id=myAppStoreID">
You can also provide other (optional) parameters for example to generate better links for the already installed application (you can link to specific content inside the app):
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
See more information here:
https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html

How to tell if webpage is running in chrome application shortcut mode

We can create application shortcut in google Chrome.
I would like to display a different layout when my web page is running in application shortcut mode - which basically is running in a separate standalone window.
Is there a way to tell if web page is running in application shortcut mode?
Right now I am testing if the window can be re-sized by JavaScript - assuming that it is running in application shortcut mode if the window can be re-sized.
I am wondering if there is a better way to do this.
[Update]
Basically we want to know if the webpage is running in a single window or running in one tab of a window.
I've just googled a bit and found this site: http://blog.kenneth.io/blog/2010/05/04/desktop-icons-in-google-chrome/
You can see this <meta> element in the first code block:
<meta name="application-url" content="http://www.example.com"/>
I haven't found any reliable and offcial documentation* yet, but it seems to work in a quick test I've just made.
In that way, you could pass an extra query string to your URI which only gets called when opening from a pinned (taskbar|desktop) short cut.
*) This <meta> element is also unofficially metioned here: Page Meta Properties - mozilla f1.
How can it be used?
Create a new HTML document:
<html>
<head>
<meta charset="utf-8" />
<meta name="application-url" content="http://www.exaple.com?shortcut=true" />
<title>Test</title>
</head>
<body>
Test
</body>
</html>
Now, open this document in Google chrome (works also with local file system!).
Create a taskbar and/or desktop shortcut via Chrome's Tools menu.
Chrome will open another window with the original URI. This is possibly a bug.
But if you use the shortcut, Chrome will open the URI provided in the <meta> tag (here: http://www.exaple.com?shortcut=true).

Categories

Resources