Site crashes on mobile devices when is called via domain - html

I try to set up website. Everything works well on PC or Mac, but when I try display my website on my iPhone or Android device there is a problem. Website is not displaying correctly and after few clicks it crashes. My investigation led me to DNS. So:
I have domain - mydomain.org.
Domain indicates to my public address on my router and specific port - my_public_ip:public_port/directory_with_website
On router I have set rule - forward requests from public_port to ip_inside_lan:80
As I wrote everything works perfectly on PC and Mac. I type mydomain.org into my browser and website is displayed correctly. But on my phone not.
But strange thing is that when I type into my mobile browser address my_public_ip:public_port/directory_with_website it works perfect.
Any ideas or suggestions?
Thank you for help

Related

How to simulate mobile/responsive behavior on PC for web development?

I am trying to figure out if it's possible to simulate mobile behavior on PC. Because on PC, I can only see how the app looks like on mobile devices, however I cannot see how the app would behave.
For example, this is how the app works on an iPhone ( it opens the keyboard on dropdown input )
But, in the browser on PC it works properly - as desired. The keyboard doesn't open up for no reason. Is there any way to test mobile browser behavior on PC?
This is PC:
Please read links below. Maybe they help:
https://www.sitepoint.com/how-to-simulate-mobile-devices-with-device-mode-in-chrome/
https://www.browserstack.com/guide/view-mobile-version-of-website-on-chrome
You can simply use the mobile simulator.
I think this extension will help you.
Mobile simulator - responsive testing tool (Google chrome extension)
I know you want to test directly on PC, but one thing you can do is to access the development environment from your mobile device.
Assuming your local dev server is running on localhost:3000:
make sure port 3000 is not blocked by firewall
connect both your mobile and pc to same network
find your pc local ip address with ipconfig (for example, 192.168.1.12)
go to [your-pc-ip]:[port] from your mobile (for example 192.168.1.12:3000)

How to display localhost website on mobile when white labelled

I can access my localhost web page over my mobile while using external IP, but it seems that my whitelabel only works with localhost address on laptop (can not use localhost address while on mobile).
Any ideas why it wont work with external IP and advice how to fix it pls, I need somehow to see this whitelabel on mobile...
Example
http://localhost:port & http://127.0.0.1:port display fine on laptop
http://externalip:port is displaying fine on both laptop and mobile
http://whitelabel.localhost:port - that is displaying fine on laptop
http://whitelabel.externalip:port & http://whitelabel.127.0.0.1:port - that is not displaying anywhere

exporting .vcf contact in mobile web app capable aka HomeScreen app

I suspect this must be intentional on Apples part but I will ask anyway because it works from both mobile and desktop safari.
I create a simple .vcf contact from inside my web app and try to download (aka export) it.
This creates a .vcf file in desktop Safari that is actually downloaded where the user actually has to click that to get it into contacts. And in the mobile safari version (without saving to home screen), the exact same code will pop up a warning screen mobile .vcf warning which at least gives the user the opportunity to import the .vcf into contacts.
Admittedly neither the desktop or mobile safari use case it a good user experience but at least they work.
Whereas, the exact same code saved as a homescreen mobile app simply fails without error on an iphone (i.e
)
I have tried multiple ways to export from the app (most of which work from safari mobile or desktop browsers if NOT web app capable)
as a blob from base64 text/vcard
as base64 text/vcard
using window.open(vcftxt); // where vcftext is base64 text/vcard
using location.href = vcftxt; // where vcftext is base64 text/vcard
using an a tag with download= and href= vcftxt url
All the above work..just not in a homescreen app that appears native
code example (run on iphone safari...not tested on android)
https://www.airbridgelabs.com/s/0/app3.html?sd=100 - Click on contacts logo at the bottom when this page opens in safari and you will see the warning which still allows the user to open the .vcf in contacts
https://www.airbridgelabs.com/s/0/app3.html?sd=100&tm2=100 - This will walk you thru saving to home screen or you can simply save to home screen manually without the tm2 parm. click on the contacts logo at the bottom when this page opens in safari and you will see nothing. Safari developer remote console shows no errors or warnings...simply does not work.
I figure I can probably pass the created .vcf to a page on my server which in turn opens the .vcf which will likely then export it to mobile contacts..but that is a lame solution which still requires the user to be online to save an embedded contact.
And please don't use the argument that this is about security. If it was about security then you wouldn't be allowed to do the exact same thing from a desktop page, or mobile safari page or hybrid native app...and you can. This looks like Apple simply reducing the value of mobile web apps that look native.
What I am looking for is an offline work around to simply save a mobile contact already coded into the mobile web app capable content the user intentionally created.

Website IP address works but not hostname

Currently I just deployed a website from Debian local server. The Website seems to run very nicely until I reach internet explorer. Here is the run down.
I type in the IP address of the server and I get the website with no error.--->
http://imgur.com/IPpM4YH
Now I will try to reach the website via HostName instead of the ip address. But the website will not display correctly.---> http://imgur.com/UVb3bAb
Now this issue only persists in IE. Google, firefox, safari... etc will not encounter this problem.
Other interesting issues:
on some computers using the servers IPadress or the host name will not display the website correctly.
Php code does not generate the the imgs for the gallery.
style sheets are recognized but not applied to the overall website
Attempt fixes
lowering security on IE, adding it to website list.
reloading files on server
rebooting all machines.
It looks as though your Internet Explorer is using Compatibility View when you view the page using a host name. It does this if it thinks the page is 'internal' (as in Intranet).
Internet Explorer never uses Compatibility View if you navigate by IP address, because it cannot tell, so it assumes the website is external.
To get your page to be always displayed in standards mode, look at the questions already answered about this: IE10 renders in IE7 mode. How to force Standards mode?

css loading in certain devices only

Hi i'm building a website with wordpress
its only a splash page for now.
the website is http://www.polymathco.com
im on a desktop mac and it displays fine, on my laptop it displays fine.
but on my iphone and ipad the css doesnt load. (it did a few days ago)
ive tried adobe browserlab and in all tests the css doesnt load.
i tried opening via a proxy site -snip- on my imac and the css doesnt load.
ive cleared my cache and cookies and it looks fine on my imac and mbp. could this be something to do with the .htaccess on the server?
the css url is generated by wordpress , (bloginfo(template_url)) and it loads fine in my desktop.
Your site seems to be looking for the css file in /polymathco/wordpress/wp-content/themes/polymath/css/style.css
When it actually appears to be in /wordpress/wp-content/themes/polymath/css/style.css
Use bloginfo('stylesheet_url') for the css file, and check your admin panel settings(under general) to make sure your site's path is set correctly.
In your admin panel, click Settings, and in General, make sure the 'WordPress address (URL)' and 'Site address (URL)' are set to your actual site, rather than localhost.