Javascript Articles - Page 546 of 671

Raise the Mobile Safari HTML5 application cache limit?

Chandu yadav
Updated on 30-Jul-2019 22:30:22

688 Views

Application cache on Safari has no limit on storing data, but for mobile Safari the rues are different.The upper limit is 5MB.On mobile safari, the local storage and session storage are 5MB each. On WebSQL, a user is asked for permissions but you cannot store data any more than 50MB.With the latest iOS version, if a web app needs more then 5MB of cache storage, a user will be asked if it has permission to increase it. This is done so that the user can manage own memory space.

HTML5 Input type=number removes leading zero

Lakshmi Srinivas
Updated on 25-Jun-2020 06:16:28

5K+ Views

The leading zero issues may arise when you want to add an international phone number.To solve this −On iOS, the numeric keyboard appears with only numbers.On Android phones, the "tel" is rightly interpreted but not the pattern.You can also use −

How to put the WebBrowser control into IE9 into standards with HTML?

Arjun Thakur
Updated on 25-Jun-2020 06:17:19

153 Views

To place the WebBrowser control into IE9 standards, you need to add the following line in your HTML web page −You can also try this for Internet Explorer 9 −You can also try this for Microsoft Edge −

What is the correct use of schema.org SiteNavigationElement in HTML?

Daniol Thomas
Updated on 27-Jan-2020 07:27:04

773 Views

The schema.org SiteNavigationElement extends WebPageElement. It is used to mark-up links that would make amazing contextual links.                    Home page                              My demo page          

How to “enable” HTML5 elements in IE 8 that were inserted by AJAX call?

George John
Updated on 27-Jan-2020 07:26:37

318 Views

To enable HTML5 elements in IE, you need to use plugins like html5shiv. The HTML5 Shiv enables use of HTML5 sectioning elements in legacy Internet Explorer and provides basic HTML5 styling for Internet Explorer 6-9,With that, you can also use document.createElement to create an element.var demo = document.createElement("demo"); demo.innerHTML = "Working!"; document.appendChild(demo);

How to either determine SVG text box width or force line breaks after 'x' characters?

Krantik Chavan
Updated on 27-Jan-2020 07:26:08

263 Views

Use the getBBox() function and add a single word at a time to a text object. When it gets too wide, you need to add a line feed.var a = Raphael(500, 500); var b = a.text(100, 100).attr('text-anchor', 'start'); var maxWidth = 100; var content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis nec semper mauris. Sed gravida augue feugiat nulla ultrices efficitur. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed sit amet lobortis eros, et lobortis diam. Aenean arcu velit, condimentum eu lacus in, dignissim bibendum odio. Mauris ultricies nunc et lorem ... Read More

How to get a key/value data set from a HTML form?

Nishtha Thakur
Updated on 25-Jun-2020 06:19:04

1K+ Views

To get a key/ value data set from a HTML form, use jQuery.Let us say this is our HTML −     For JS −var data = $('form#form1’).serializeArray(); // [{'demo: 'value'}] $.ajax({    data: data });

How to save HTML5 canvas data to file?

George John
Updated on 27-Jan-2020 07:08:50

574 Views

Use PNGStream to save HTML5 canvas to file.var f = require('fs') , out = f.createWriteStream(__dirname + '/text.png') , stream = canvas.pngStream(); stream.on('data', function(chunk){    out.write(chunk); }); stream.on('end', function(){    console.log(‘PNG Saved successfully!’); });

Does HTML5 allow you to interact with local client files from within a web browser?

Anvi Jain
Updated on 25-Jun-2020 06:09:11

224 Views

No, HTML5 does not allow you to interact with local client files directly. You can use drag and drop or FileSystem API for this.ExampleLet us see an example of drag and drop on a web browser using HTML5 −                    #boxA, #boxB {float:left;padding:10px;margin:10px; -moz-user-select:none;}          #boxA { background-color: #6633FF; width:75px; height:75px; }          #boxB { background-color: #FF6699; width:150px; height:150px; }                      function dragStart(ev) {             ev.dataTransfer.effectAllowed='move';     ... Read More

Which browsers support the HTML5 History API?

Samual Sam
Updated on 27-Jan-2020 07:07:22

223 Views

The WebKit-based browsers and Firefox 4 mainly supports the HTML5 History API. However, now almost every modern browser supports it.Firefox 4+Google ChromeInternet Explorer 10+Safari 5+iOS 4

Advertisements