Neo Neo - 1 month ago 7
HTML Question

www subdomain looks different than main domain on Google Chrome

I'm working on a website which looks different when the browser is pointed to root domain and when pointed to "www" subdomain. The canvas width, font sizes, image sizes vary slightly between the root domain and "www" subdomain.

EDIT 1: This happens only on Google Chrome. On firefox, both pages look same.

Please refer to these external links to my site in Google Chrome.


  1. Without "www" - https://myshaadiwale.com



Root MyShaadiWale screenshot


  1. With "www" subdomain - https://www.myshaadiwale.com



Subdomain MyShaadiWale screenshot

Even the browser console does not show anything amiss. What could possibly cause this difference?

The website is based on python flask+apache stack. The apache configuration file looks like this:

<VirtualHost *:443>
ServerName myshaadiwale.com
ServerAlias www.myshaadiwale.com
ServerAdmin webmaster@localhost

SSLEngine on
SSLCertificateFile /root/ssl/myshaadiwale.com.crt
SSLCertificateKeyFile /root/ssl/myshaadiwale.com.key
SSLCertificateChainFile /root/ssl/intermediate.crt

WSGIDaemonProcess msw user=live group=live threads=5 python-path=/home/live/msw/flask/lib/python2.7/site-packages
WSGIScriptAlias / /home/live/msw/msw.wsgi

<IfModule mod_deflate.c>
<IfModule mod_filter.c>
# these are known to be safe with MSIE 6
AddOutputFilterByType DEFLATE text/html text/plain text/xml

# everything else may cause problems with MSIE 6
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/xml
</IfModule>
</IfModule>

<Directory /home/live/msw>
#Header set Access-Control-Allow-Origin "*"
WSGIScriptReloading On
WSGIProcessGroup msw
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName myshaadiwale.com
ServerAlias www.myshaadiwale.com
Redirect permanent / https://www.myshaadiwale.com/
</VirtualHost>

Answer

The pages are still pixel identical. The problem is that you have changed the browser zoom level and Chrome remembers this on a per-domain basis. Press Ctrl 0 to reset the zoom to 100% and the pages will again be identical. Pressing Ctrl + will reproduce the problem exactly as shown in the screenshots.

Comments