Chinese URL loads correctly in Edge but not other browsers

This page was developed in english which works well in Chrome and Edge browsers. Some community members asked then to translate it to Chinese. Same strategy to create the page was taken with the following resulting page.

The problem is that sometimes the Chinese version page doesn't load. Specially when pasting the URL from somewhere else. In the other hand when navigating from the landing page, blog area, it displays correctly.

How to fix that so that it works for every browser correctly. One interesting thing I just noticed was that sometimes copying the link results in:

https://ethereumclassic.github.io/blog/2017-08-27-社会币的崛起/

Sometimes in:

https://ethereumclassic.github.io/blog/2017-08-27-%E7%A4%BE%E4%BC%9A%E5%B8%81%E7%9A%84%E5%B4%9B%E8%B5%B7/


check the vendor of bundle.js for updates. It appears to be an old version.

function webpackContextResolve(req) {
    return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());

// error occurs in above.
};

To debug web site load code, first navigate to a blank page (about:blank). Then display and pin the dev tool to the blank page.... select the debug tab of dev tools and choose "Break on All Exceptions" from the dropdown.. (looks like a Stop sign).

Without closing the dev tool, return to the blank page and navigate to the English and then the Chinese sites.... the dev tool will now break on errors. 映射未定义的错误 To debug browser sniffing issues. (find code that uses browser userAgent sniffing to load different versions of a web site). Use the debug tab of the dev tool to find occurrences of "navigator" or "userAgent". 找到UserAgent嗅探代码

You can test if a web site is incorrectly determining the browser features by changing the userAgent header from the Emulation tab of dev tools. Oddly, changing the UAS in dev tools in IE11 has the same result... suggesting that the enableLazy assignment in bundle.js is the cause. 使用仿真选项卡更改浏览器使用的UAS var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /bEdge/d/.test(navigator.userAgent);

bundle.js seems to be a problem.... check the vendors website for updates to their software....

Also... you have set the page language to en... it should be zh. eg.lang="zn"......


I have detected some problems due to the url encoding and difference between lower and uppercase characters.

With PHP i am doing a URI conversion previous the router parse:

if(strpos($_SERVER['REQUEST_URI'], '%') > 0){
    $uri = $_SERVER['REQUEST_URI'];
    $result = preg_replace_callback(
        '/%(w{2})/',
        function ($matches) {
            return strtoupper($matches[0]);
        } ,
        $uri
    );
    $_SERVER['REQUEST_URI'] = $result;
}

Your problem is the bundle.js by removing it i obtained your webpage without any problem:

在这里输入图像描述

Did you put it in an unsupported event?

The js says:

  • NOTE: This will not work correctly for non-generic events such as change , * reset , load , error , and select . *
  • 链接地址: http://www.djcxy.com/p/40460.html

    上一篇: 使用C ++共享指针的别名构造函数和一个空的共享指针

    下一篇: 中文URL在Edge中正确加载,但不在其他浏览器中加载