meta.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * @description: 页面meta 标签配置
  3. */
  4. export default [
  5. { hid: 'description', name: 'description', content: 'webRTC' },
  6. // 告诉 IE 浏览器使用最新的渲染引擎(Edge 模式)来渲染页面,而不是使用旧的兼容模式。这可以确保页面在 IE 浏览器中以最佳方式显示。
  7. { hid: 'X-UA-Compatible', httpEquiv: 'X-UA-Compatible', content: 'IE=edge' },
  8. // 强制页面在移动设备上以竖屏模式显示
  9. { hid: 'x5-orientation', name: 'x5-orientation', content: 'portrait' },
  10. // 与 x5-orientation 类似,用于指定页面的方向
  11. { hid: 'screen-orientation', name: 'screen-orientation', content: 'portrait' },
  12. // 控制页面在移动设备上的视口(viewport)行为
  13. { hid: 'viewport', name: 'viewport', content: 'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no,viewport-fit=cover' },
  14. // 允许网页应用以全屏模式运行 当用户将网页添加到主屏幕后,点击图标打开时,页面会以全屏模式显示,隐藏浏览器的地址栏和导航栏。适用于将网页应用伪装成原生应用的场景
  15. { hid: 'apple-mobile-web-app-capable', name: 'apple-mobile-web-app-capable', content: 'yes' },
  16. // 控制页面在 iOS 设备上的全屏模式和状态栏颜色
  17. { hid: 'apple-mobile-web-app-status-bar-style', name: 'apple-mobile-web-app-status-bar-style', content: 'black' },
  18. // 禁止自动识别电话号码和邮箱地址
  19. { hid: 'format-detection', name: 'format-detection', content: 'telphone=no, email=no' },
  20. // 启用360浏览器的极速模式
  21. { hid: 'renderer', name: 'renderer', content: 'webkit' },
  22. // 针对手持设备优化
  23. { hid: 'HandheldFriendly', name: 'HandheldFriendly', content: 'true' },
  24. // 微软的老式浏览器优化
  25. { hid: 'MobileOptimized', name: 'MobileOptimized', content: '320' },
  26. // UC强制全屏
  27. { hid: 'full-screen', name: 'full-screen', content: 'yes' },
  28. // QQ强制全屏
  29. { hid: 'x5-fullscreen', name: 'x5-fullscreen', content: 'true' },
  30. // UC应用模式
  31. { hid: 'browsermode', name: 'browsermode', content: 'application' },
  32. // QQ应用模式
  33. { hid: 'x5-page-mode', name: 'x5-page-mode', content: 'app' },
  34. // 禁用 Windows Phone 8 及更高版本中的灰色点击高亮
  35. { hid: 'msapplication-tap-highlight', name: 'msapplication-tap-highlight', content: 'no' },
  36. ]