www子域名与Google Chrome上的主域名不同

时间:2016-01-16 13:24:58

标签: html css apache flask

我正在开发一个网站,当浏览器指向根域并指向“www”子域时,该网站看起来有所不同。画布宽度,字体大小,图像大小在根域和“www”子域之间略有不同。

编辑1:这仅在Google Chrome上发生。在Firefox上,两个页面看起来都一样。

请参阅Google Chrome浏览器中我网站的这些外部链接。

  1. 没有“www” - https://myshaadiwale.com
  2. Root MyShaadiWale screenshot

    1. 使用“www”子域名 - https://www.myshaadiwale.com
    2. Subdomain MyShaadiWale screenshot

      即使是浏览器控制台也没有显示任何错误。什么可能导致这种差异?

      该网站基于python flask + apache堆栈。 apache配置文件如下所示:

      <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>
      

1 个答案:

答案 0 :(得分:2)

页面仍然是像素相同的。问题是您已更改了浏览器缩放级别,Chrome会根据每个域记住这一点。按Ctrl 0将缩放重置为100%,页面将再次相同。按Ctrl +将完全按照屏幕截图所示重现问题。