Im looking for some guidance on a responsive site design written using Bootstrap 3.
Basically I want the mobile version to be as lightweight as possible and only load JS and HTML that is necessary for the mobile view, and not load assets required for the desktop view. I would like to ignore loading specific JS files when the page is loaded via a mobile device.
Is there a simple method to do this with Bootstrap?
My guess is that I need a Javscript function to detect the device and use that as a trigger, however I was wondering if Bootstrap had this capability that I could use?
Appreciate any thoughts.
It seems there is already answer to detect mobile browser with javascript. Detecting a mobile browser
Otherwise you can detect the mobile device by using http_user_agent to decide not to load assets when the page is loading.
Here is already answer to detect mobile device with php.
Check if PHP-page is accessed from an iOS device
You can perhaps do it by user agent. There is an answer here that might help
Load a javascript file and css file depending on user agent
Related
I want that my online website link that is opened in my mobile browser checks whether my mobile app is installed or not and then opens it in my mobile app.
I want my functionality as I have shown in this
image
I am using AngularJS,Express,NodeJS in my application.I tried node deeplink
but it does not work for me.Please provide me with the appropriate solution.
This functionality is known as Mobile Deep Linking. The easiest way to get started is with a deep linking service like Branch.io (full disclosure: I'm on the Branch team), Yozio, or Firebase Dynamic Links. They all do exactly what you're describing.
this could Help you perhaps:
Check this
I'm working on a simple mobile website for a hotel.they don't need much dynamic feature.most are simple HTML.So my question are as below.
I find it's hard to debug mobile website on Ubuntu.cause you know ,desktop browser are to big to show a mobile website.each time i need to put it on a server.then using a phone to test the mobile website.is't too annoy.is there a better way to do this?
On windows u have Dreamweaver to change the css style.but on Ubuntu can I find a tool like Dreamweaver?
is any any JavaScript code for animation for a mobile website.
Jquery mobile is a good js lib to create the basic element in webpages.but if I want to do some transition between pictures.how could I do that.
PS:if you want to use php to send a email to a email address how to do that?
In chrome you can emulate a mobile device, the viewport and user agent will adjust to desired device. In your developer tools you have something called Emulation where you can change your device.
Link!
To send a email with PHP, check the documentation:
Link to php docs
FWIW, I would reccomend you start with a resposive framework. There are plenty of great options, including Bootstrap , Foundation or Skeleton
From what you describe about your requirements, responsive is going to be a good fit for your client and you'll future-proof your design.
Then with a responsive design, you can test everything in a standard web browser by making the viewport or window wider or smaller.
Good luck!
As we know, an Kendo-UI Mobile application has some major parts:
HTML files
JavaScript files
CSS files
resource files (images)
My main question is: Is there is a way to update HTML, CSS, JS and other resources? I mean doing this without native OS update procedure.
Could I access KendoUI Mobile storage, where these resources (index.html, etc.) are stored?
If the user accesses your application as a web page, then these files are updated automatically. Then the goal is to cache them on the local device so that every time the user accesses them, they are not re-downloaded.
If you want your html + javascript to act like a downloadable app, then Telerik recommends using Phonegap (aka Cordova) to wrap your html into a downloadable app. One of the big advantages of Cordova is that it gives your javascript access to the device's features (such as GPS, camera, contacts, and local storage). Telerik has a dev environment that (Icenium) which makes this extra simple. Once the user has downloaded your app, the standard mobile practice for updating the app to a new version takes place (ex: the user sees version upgrade badge and chooses which apps will be updated). For details as to why an app can't simply update all it's files invisibly, kxb as a great post.
I'm busy building a web page where I'm using HtmlEasy and Silken with Google Closure Templates.
With ASP.NET MVC4 there is a technique of serving a mobile version of a web page by changing the file name to .mobile.. So it is not just the same version served up using a different stylesheet - the contents/data too can be different. This is really great since not everything may be relevant for a person using a mobile device.
Does HtmlEasy and Silken provide the same or similar feature? I can't seem to find anything that'll help.
Ok, when you need to detect any mobile device then its better to make use of a database.
For my own project I'm using 51Degrees Lite. Pass the user-agent to the lib and it'll tell you if the device is mobile or not. Then serve your soy template(s) accordingly.
I have a mobile website made in jQuery Mobile and I would like to integrate some parts of it in a Phone Gap mobile app.
The app will provide some offline features (using local html and JS) and will integrate with the mobile website sending forms and receiving its pages (that are already in jQuery Mobile).
What do you think is the best strategy to do this? Should I write services or should I keep the ongoing html pages?
After seeing your comment above, Yes You can wrap it with phonegap and launch in app store. Then consider this, you can create services to return JSON(only for dynamic data) and load all your HTML templates on to the app (wrap with phonegap).
So static data/contents gets loaded from within the app and the dynamic content comes from server. Now enable offline caching for the dynamic contents which you want to enable for offline access.
TO enable offline access, you can either use webkit local storage(5Mb~50Mb) or a native phonegap plugin for more storage.
Hope this helps.