How to load page synchronously using jQuery

后端 未结 6 1108
遥遥无期
遥遥无期 2021-01-23 04:03

Currently I am using jQuery to choose what my index page should load depending whether a cookie is set.

For example, the body tag of the index.html should load hasCookie

6条回答
  •  醉话见心
    2021-01-23 04:53

    In your case, this sounds like it would really be a better idea to implement server-side if possible. In PHP it would be a simple matter of detecting if the cookie you want is set in the $_COOKIE array and outputting the correct page.

提交回复
热议问题