php, codeigntier, blackberry browser, cookie and redirect issues

#1
[eluser]searain[/eluser]
Hello, I have a mobile web site, works fine on iphone, and many other mobile devices. And I build dozens mobile sites before based on the same framework I developed. I used codeigntier to develop my own frame. But some blackberry users just report that the newest site I am building is not working.

"Cannot navigate or return blank page."

I don't have her device so I cannot do intensive tests to pinpoint the problem.

The only difference for this new site is due to some advanced features I added, I used redirect() and cookie more than other sites. My guess the problem is the limits either cookie or redirect of her blackberry.

Here is what I know for sure,

1) Her blackberry accept cookie, and cookie is set up and saved, due to there are some pages requiring cookies are working for her.

2) I found out there were redirect limits on blackberry, default 5. I checked my codes, the redirect is max. 2 times.

So anyone has problems with blackberry cookie or redirect before?

Thanks!

#2
[eluser]bigtimslim[/eluser]
searain, I don't have any answers for you, but I have recently read of problems with handheld detection and blackberry. I am currently making moblie versios of a few sites (probably will just make mobile stylesheet). Is your framework available? What features does it have for mobile, what makes it different?

#3
[eluser]searain[/eluser]
Actually I think I fixed my problem.

It has something to do with redirect and cookie set up on blackberry browsers. Try separate the redirect and set cookie (even usually they go hand in hand) if you see the problem such as login (cookie issue actually) and redirect on some blackberries.

Blackberries may smartly think your redirect is wrong and reject it and so your cookie wouldn't get set up right.

#4
[eluser]searain[/eluser]
bigtimslim, as for your question.

First of all, mobile site is not just regular site but with small screen size like some people said. Totally wrong.

1) First, if you want, you can check out this book and the author has a simple but very good framework sample in this book. I borrowed some ideas from this book but I totally rewrote all the MVC.

http://p2p.wrox.com/book-professional-co...245-8-414/

2) Actually, yes. You just need a different view for the mobile site justlike for the regular site. But this different view is not just small size.

My co-worker gave me some good advices like the below when I started on mobile sites.

Good tutorial - please read: - especially info about xHtml Mobile Profile and Wap Css/Wcss:
http://www.developershome.com/wap/xhtmlm...lessMarkup

xHtml mobile profile - please read:
http://en.wikipedia.org/wiki/XHTML_Mobile_Profile

xHtml tutorial - please read:
http://www.w3schools.com/Xhtml/default.asp

Guidelines to building a mobile website - good post - please read:
http://groups.google.com/group/google-ch...e167?pli=1

Mobile best practices - for reference only, if you need to look something up
http://www.w3.org/TR/mobile-bp/

3) Several points from my experience.

use strict xhtml.

Use utf-8 will save you a lot of troubles.

use this line to add the at the top in your php view page (I set this in header file of the view), echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";

add this meta tag too, <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

use css not table.

keep everything simple.

Use less javascript, not trying to be fancy if you want your mobile site support more devices.

Now I would add this. be careful with cookie and redirect. Smile

Good luck.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.