Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- javascript



  Ajax file upload tutorial

Step 1 - AJAX file uploadAJAX file upload tutorialFirst of all I have to say that to create a pure AJAX file upload system is not possible because of security limitations of JavaScript. All of the Ajax upload systems I know use some third party tool/package or only mimics the AJAX feeling. Even so it makes file upload process a bit nicer. In the next section I will present you a solution which imitates the AJAX process, but uses a normal upload process and iFrames.The concept: Create a simp...

   Ajax,File upload,PHP,Tutorial,IFRAME     2011-04-22 13:34:33

  How To Optimize Your Site With HTTP Caching

I’ve been on a web tweaking kick lately: how to speed up your javascript, gzip files with your server, and now how to set up caching. But the reason is simple: site performance is a feature. For web sites, speed may be feature #1. Users hate waiting, we get frustrated by buffering videos and pages that pop together as images slowly load. It’s a jarring (aka bad) user experience. Time invested in site optimization is well worth it, so let’s dive in. What is Caching? ...

   Website performance,Speed,HTTP Cache,Hash code     2011-12-10 06:11:33

  jsonSerialize() in extended class

Since PHP 5.4.0, there is a convenient interface JsonSerializable which can be used to indicate that a PHP object can be serialized to JSON object. It has only one method which should be implemented by any class which implements this interface. The method is named jsonSerialize(). It's really easy to serialize an object to JSON object. Here is one example: <?php class ArrayValue implements JsonSerializable { public function __construct(array $array) { $this->array = $array; ...

   JSON,jsonSerialize,Inheritance,extends     2014-07-26 05:54:00

  A mini guide to HTTP referer

In HTTP header, there is a field named Referer which is to provide the referrer of the current accessed page. In this post, we will introduce the usage of HTTP referer field. On the web, when a user visits a webpage, s/he must be from some place. This place is usually referred a s referer. This information is very important to some website operators and server owners as they want to know where they get the traffic from and this helps them provide better service for potential targeted users. In t...

   HTML,HTTP REFERER,REFERRERPOLICY     2019-06-29 02:23:25

  The danger of target=_blank and opener

When want to open a new page in a new tab on clicking a link on a page, the usual way of achieving this is to use target="_blank" property in a tag. However, the use of this leaves space for phishing website. Background parent and opener Before talking about the opener object, let's know a bit about parent object when using iframe. HTML provides a parent object which is used to communicate between the parent page and the embedded iframe element. This parent object can be accessed using...

   HTML,TARGET BLANK,REL NOOPENER,REL NOREFERRER     2018-09-15 04:53:56

  Battlelog: Modern Web Applications are Here

It's the shooter season of the year and this fall was all about Modern Warfare 3 versus Battlefield 3. And being the kind of game they are they also try to keep their audience playing by introducing some additional level of engagement. Both Call of Duty and Battlefield introduced their own online community websites and statistic platforms. Call of Duty has Elite, Battlefield has Battelog.But just because these services are sitting in the same spot it does not mean they are in any way similar. An...

   Game,Call of duty,Elite,Battlelog,Web platform     2011-11-15 08:11:40

  Let browser prompt for storing password when doing AJAX login

In Web 2.0 era, more and more web applications are using AJAX to replace the traditional HTML form element to perform user login. This usually provides a better user experience than form submission. But it also brings a side effect to the end users. That is the browser will not prompt the user whether s/he wants to save the password so that s/he no needs to enter the username/password again when visiting the same site next time. Below is the code snippet which does the AJAX login.  <scri...

   AJAX,Browser,Login,Password     2015-06-04 10:02:46

  Essential skills any web developer should have

As a web developer, besides writing HTML code, there is much more to do before the site can go live. You may consider about user experience, device compatibility, security etc. To be a good web developer, you should acquire some essential skills for web development. Below we list some of them. Some of them you may be familiar with a long time ago, but definitely some of them you may not be so familiar with or even never hear about before. Interface and User Experience Be aware that browsers imp...

   Web development,User experience     2014-03-21 06:44:49

  A re-introduction to JavaScript

Introduction Why a re-introduction? Because JavaScript has a reasonable claim to being the world's most misunderstood programming language. While often derided as a toy, beneath its deceptive simplicity lie some powerful language features. 2005 saw the launch of a number of high-profile JavaScript applications, showing that deeper knowledge of this technology is an important skill for any web developer. It's useful to start with an idea of the language's history. JavaScript was created in 1...

   JavaScript,Types,Array,Re-introduction,OOP     2012-02-09 05:38:08

  Computer skills one can learn within one day

Computer related technical skills are usually thought as complicated and difficult to understand. It's very difficult for one to get hands on one skill or master one skill. But if you really do want to learn something useful within one day, there are some good choices which will not take too long to get to know and use.. Version control:- Git, GitHub and SVN Regular expressions AWK sed Grep Learn how to do things with Vim that you never knew could be done. Set up a crawler that can scrape some ...

   Computer skills,Learn     2013-09-16 08:51:35