Tagged articles
Image from Pexels

Tagged articles - JavaScript

Found 35 articles tagged with JavaScript

HTML5 localStorage with expiry with vanilla JavaScript
Using HTML5 localStorage with expiry
0
HTML5 comes with a lot of handy features which can really improve user experience of your web application significantly if you use them wisely. Caching cold data on the client, such as lookups can significantly save the amount of traffic, page load time and even you backed services load. One of the HTML5 features that can help you do this are sessionStorage and localStorage...read more
Monitoring DOM changes with JavaScript
Handling DOM changes with plain JavaScript
0
If you are dealing with pure JavaScript without using any library, you probably want to trigger your custom actions on some element event. This is easily done with addEventListener which is in general supported by all now days browsers. ...read more
Handling Cross-Site Scripting (XSS) in ASP.NET MVC
Handling XSS in ASP.NET MVC with custom Razor Html helpers and HttpModule
 
0
Cross-site Scripting (XSS) refers to client-site code injection attack where an attacker can execute malicious scripts into a web application. Basically attacker manages to upload malicious script code to the website which will be later on served to the users and executed in their browser...read more
Minify CSS and JavaScript files with PowerShell script
JavaScript and CSS file optimization with PowerShell script
 
0
Minification of Cascade Style Sheet (CSS) and Java Script (JS) should be on a TODO list for every web application. The minification of CSS and JS can be easily one on the runtime with ASP.NET bundling which is build in in ASP.NET framework, but in case of distributing your resource files over CDN you cannot use the runtime minification. You physical files need to be minified...read more
Multiple file upload with ASP.NET WebApi
Upload multiple files using WebApi REST service
0
Taking out business logic from the application allows different clients running on a different platform to use same logic. REST API is a great way to decuple business logic and make it available to different clients on a different platforms. To upload files using WebApi we first need to define an action in a WebApi controller to handle files posted to the endpoint. ...read more
JavaScript base64 image to Bitmap in C#
Converting base64 image string to Bitmap in C#
0
Base64 serialized images are useful in many cases for serving images on page. It is also a format of image that JavaScript can generate on the fly. HTML canvas object has native support for base64 and it can be easily serialized to base64 string from JavaScript code by invoking toDataURL method of the canvas element. ...read more
Non blocking CSS load on the page
Load external CSS files in an async manner
 
0
Like JavaScript, CSS files are also loaded on the page by default in a blocking manner. Luckily for us, for JavaScript we can use either async or defer attributes on the script tag itself to change the behavior of JavaScript external file loading...read more
Inline JavaScript and CSS tags with ASP.NET MVC
Rendering inline JavaScript and CSS tags in document in MVC
 
0
With ASP.NET MVC Microsoft introduced bundling of JavaScript and CSS resources. These bundles work pretty well but to me it always looks not so natural to define bundles in BundleConfig.css and I had problems if I want to edit CSS or JavaScript during runtime because they are cached...read more
Serialize html form to JSON without using JQuery
Transform user input from HTML form fields to JSON
0
jQuery makes things a lot easir when working with DOM. So many thing there out of the b and you do not need to worry about browsr compatibility. Browser compatibility used to be a big deal few years back, but not it all comes to almost one engine which is WebKit. ...read more
Copy text value to clipboard using jQuery
Simple sample of using jQuery to copy value to clipboard
0
I recently needed to copy some value from the web UI to clients clipboard. Since this is not something you often need to use, I googled a little bit and found that this is easy to do with document.execCommand...read more
Resize image on the client side with JQuery
Reducing the upload sie by resizing image on the client side
0
Image resizing is considered as a server side operation as JavaScript and HTML were not so sophisticated and HTML5 support was not widely adopted for quite some time. even now, some features are not equally supported by all major browsers. Anyhow, HTML5 is here to stay and over time we will get more and more features supported by all browsers. ...read more
Parse date of Facebook OpenGraph API response with JavasScript
Converting datetime string from Facebook API response to JavaScript Date object
0
Recently I had an issue while working on an update for my Facebook Album Browser plugin with dates returned from Facebook OpenGraph API. The dates are returned in the following form 2011-06-13T23:31:19+0000 and luckily for me, converting this string to an actual Date object in JavaScript worked pretty well for most of the browsers, but some of them like Safari on iPad did not know to convert this string to a Date object and because of that I was getting default JavaScript date 1970-01-01 00:00:00 UTC+00. After some time spent googling and checking regular expressions, I did not find a suitable solution for this. ...read more
Delayed execution in JavaScript
Thread sleep equivalent in JavaScript
0
Not very often, but from time to time you need to slow down your code. Most of the time the reason for that is that you need to test some long execution, mostly external source call...read more
Working with GoogleMaps in jQuery style
jQuery plugin for GoogleMaps
0
I've used GoogleMaps on several web projects and it seemed to me that I'm repeating a lot of code used in the previous projects which lead me to write a common Javascript library to help me easily reuse the code by only copying the JavaScript library to a project or referencing it from CDN. I could not think of a better way to build this library than to use jQuery and build a pligin for this. ...read more
Recognize links in text content with jQuery
Find and replace URLs with anchor tags inside the text
0
Very often when you are dealing with content from 3rd party like tweets from Twitter of Facebook posts and comments you might end up with some URL inside the content. On both Twitter or Facebook or any other social network, links inside text comments are replaces with anchor tags to those URLs. In order to keep the same user experience and make it more useful o your side where you are serving the content from the other party it is recommended that you do the same. ...read more

.NET

read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more