Drupal cache issue while we use Responsive web design - drupal

I'm new to drupal and I have an issue with drupal6 caching system. I have enabled drupal cache and it will refresh the cache for every 5 mins. I have couple of themes for my site. One for normal desktop users and another one for mobile users. Now the problem is once I open the site from mobile for the next 5 mins the mobile theme is caught by drupal cache and the same is sent to desktop request also. Even though I open the site from desktop it self I can view the pages of mobile theme only. After clearing cache manually or after 5 mins I can view the desktop theme.
$useragent = $_SERVER['HTTP_USER_AGENT'];
I used this function to get the media type.
If any one already faced this issue please help me to come out of this issue.. thanks..

You can try this module http://drupal.org/project/mobile_tools to switch templates for mobile and desktop users.
In your case code which detect user agent also cached. So it always (during 5 mins) shows you or mobile or desktop template.

Related

How do I update my website cached version on Google cachedview?

I am developing a website and I faced an issue today on my site, I will try to briefly explain the scenario hoping anyone could give a proper explanation for it.
My website is a WordPress website and I have the coming soon page activated so users will be redirected to it.
Two days ago I turned that plugin off by mistake and users were able to see my page. Today I turned it back on, and that's where the issue arises.
In full web (desktop) the coming soon page is visible and working fine, but when I hit the responsive view on my chrome browser the page is still available and the welcome page is not. In the sources tab, I can see the hosted directory being loaded so I went to the hosted directory (public_html) and I hid the folder that contains all the assets (renamed it to .foldername).
I hit refresh still loads the old page when I hit ctrl+shift+r I get the new version. On Firefox the scenario isn't reproducible it just happens on responsive view on Google Chrome browser.
Can anybody explain to me what's happening I assume it has something to do with Google caching my webpage and never updating it. But if like to hear a more professional explanation Thanks.
Have you tried clearing your Cache in Google Chrome? Also, Have you enqueued any Scripts or Styles in your functions.php file? If so, increase their version number. This will force the browser to download the Scripts and/or Styles again rather than loading any Cached copies.
Hope this helps to resolve your problem(s).

why my website not showing in windows phone browser?

I deployed my website with WordPress and updated my time early time ago, after updating my site showing in android and windows very good but in a windows phone browser it is not showing; it is a big question for me why this problem happened???
my site URL: http://kookarnik.com
OK. this is how you can resolve it.
List item
login to admin panel
disable all plugins.
see you site is working.
if it is working enable plugins one by one. you can find who can crete the cause. update perticuler plugin on use alternative.
same time try with different windows mobile also. problem can be in browser as well

Issue in viewing site in browsers when using WP Super Cache along WP Mobilizer

For one of my sites, i use WP Super Cache along with WP Mobilizer to serve the mobile theme for mobile/smartphone visitors.
What is happening, from time to time, the desktop version shows the mobile site and mobile site shows the desktop version.
This is frustrating when a mobile visitor is unable to see a mobile optimized theme.
For the record, W3 Total Cache does not work on my box and i switched over to Super Cache after my dedicated server crashed on a default install of total cache. Even before it could be configured, load spiked so much that the server kept running out of memory.
back to the issue, i posted a support ticket on both the plugins #wordpress, but not a single response. I emailed the authors offering to pay them for their time but still nothing.
Any help on this would be greatly appreciated.
Does the site work after removing the Super Cache plugin? I guess the issue is when a visitor on same IP visits your website from different devices the previous version of the site is loaded. I suggest not to use WP Super Cache as it is outdated and many problems are reported after updating WP, you should move to some other cache plugin like http://wordpress.org/plugins/quick-cache/

How to make a aspx website compatitble with mobile

I have created a Login webpage in asp.net with oracle as back end. Its kind of portal thing.
When I am loading the web page in laptop browser its completely fine.
When I am loading the web page in mobile browser its loading as normal with no problems.
But I want to load the page with a customized view when browsed in iPhone/mobile . Can anyone give me idea how to do it please?
Example: when facebbook.com loads in iphone it uses the same databse but completely different view than in desktop.
Thank you
The best way I find to do this is to add a separate mobile site (e.g. m.domain.com), and have mobile browsers redirect to this.
For adding a seperate mobile site, this guide seems to explain it very well.

How can I redirect my wb site visitors to an m.mydomain.com version when started from a mobile phone?

How can I (or would you) redirect visitors visiting your web pages when they are viewing your site from a mobile phone ?
I want to set up a site with the (standard?) m. prefix.
Idially I would my visitors to be redirected to these pages when they visit my site using a mobile phone ?
I am using Windows IIS6 and IIS7.
You could check the HTTP_USER_AGENT string sent in the request header. This is unique for each version of each browser. For instance you could check for the presence of 'iPhone' in the HTTP_USER_AGENT to identify iPhone users. You would need to identify all mobile phone browsers.
Or you could check the dimensions of the users viewport. If smaller than a certain size then direct to the 'mobile' phone version?
Just a thought... with mobile phone browsers getting ever more powerful is there always a need to go to a mobile phone version of the site? For instance the iPhone 4 has a massive 960x640 resolution! But I guess it is still a small form factor and users probably interact with it differently.
I needed this for my own webpage. I evaluated several existing mobile user agent detectors, and created a small PHP script of my own. Not sure if PHP is an option for you. If not, the principles can probably be ported easily to another language/system. You can find the info on my blog.

Resources