duanlao6573 2013-09-25 11:20
浏览 90
已采纳

屏幕分辨率检测

I know that similar questions were asked but this is different.

Intro: i'm triyng to make an website with adaptive designs (3 templates for 3 widths intervals as follows: 1200+px, 600-1200px, 600-px).

Problem: i have a really hard time with user screen width detection. I' know that only js can detect user screen size so i tried two ways of detection. 1. First i used a cookie in order to store the width but because cookie becomes active only after refresh i need to refresh the page. 2. Second o used to send width as param with GET but again i need to refresh the page in order to send params.

So the question is: is there a way to get screen size without page refresh (the value to be stored in a cookie/session). I need the proper template to be delivered on first visit of page.

If there is no solution (only with refrest needed) for width detection how can a solve the problem for crawlers so they won't see the redirect.

  • 写回答

3条回答 默认 最新

查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 关于#网络安全#的问题:求ensp的网络安全,不要步骤要完成版文件
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥20 使用Photon PUN2解决游戏得分同步的问题
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序