![]() |
Library to prevent loading user_agent on every page - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Library to prevent loading user_agent on every page (/showthread.php?tid=64212) |
Library to prevent loading user_agent on every page - moshair - 01-27-2016 Hello, I use user_agent to show a specific style for mobile device, also I don't want showing content for search engines, I don't want loading the user_agent every time the page load to reduce memory and CPU usage; So I wrote this library: Common.php Code: <?php In the controller I have for testing: Code: <?php It is working on mobile browser, but any body know if it will work with search engine bots !!!! Regards, |