coolair
V2EX  ›  问与答

有没有办法在页面载入时判断用户是在局域网内还是外网,分别从不同的地方加载静态文件?

  •  
  •   coolair · Oct 27, 2017 · 1218 views
    This topic created in 3213 days ago, the information mentioned may be changed or developed.
    如果是局域网内的用户,则加载本地的静态文件;如果不是局域网内的用户,则加载外部 CDN 的静态文件。
    1 replies    2017-10-27 17:59:48 +08:00
    owt5008137
        1
    owt5008137  
       Oct 27, 2017 via Android
    查 ip 段呀,局域网就往局域网的 cdn 跳,外网就往外网跳呗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2767 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 05:22 · PVG 13:22 · LAX 22:22 · JFK 01:22
    ♥ Do have faith in what you're doing.