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

 HTML


  Load html content properly in iframe

When loading content in an ifrasme, there are normally two ways: loading with src or creating iframe dynamically and set content dynamically. In this post, we will talk about how to properly load content in a dynamically created iframe element, especially on how to fix some issue we faced while in Firefox.To create an iframe dynamically, we would normally use JavaScript and with below piece of cod:let iframe = document.createElement("ifrasme");iframe.innerHTML = "this is some text";document.getElementById("content_zone").appendChild(iframe);Once this is ran, an iframe element with html will be...

1,770 0       HTML IFRAME BLANK FIREFOX FIX


  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 the request header of a HTTP request, there is a Referer filed which can be set to the referrer URL ind...

96,665 0       REFERRERPOLICY HTTP REFERER HTML


  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.Backgroundparent and openerBefore 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 window.parent. Similar to parent, opener can be used to access the window element of the page which op...

38,525 2       REL NOOPENER TARGET BLANK HTML REL NOREFERRER


  How to check whether a web page can be loaded in iframe

Sometimes you may want to load other website's page in your own website's iframe, but due to some security concerns, other website may have security configurations which prevent you from loading their pages into your iframe. In this case, if you try to load them, you would see a blank page or a text message telling that it's prohibited. Fortunately, you can detect this before you actually decide to load it.To prevent a page from being loaded by an iframe from other site, the response header sent to the browser will contain some options which denies the load. These response header opt...

33,732 2       IFRAME SECURITY X-FRAME-OPTIONS CONTENT-SECURITY-POLICY HTML HTTP


  Show Bootstrap tooltip in AngularJS ng-repeat elements

In contemporary web application development, many front-end frameworks have been used to accelerate the speed of development and circumvent browser compatibility issues. Among them, AngularJS and Bootstrap are two frequently used. AngularJS is a MVC JavaScript framework developed by Google to provide easy synchronization between user view and data model. While Bootstrap is developed by Twitter and it eases the work of designing a simple and concise UI without much manual design work involved. In some web applications, both frameworks are used together.Tooltip is a component provided ...

15,268 6       BOOTSTRAP ANGULARJS TOOLTIP NG-REPEAT


  Remove browse button from input type=file

In Web 2.0 era, many websites will ask the user to upload their avatar when creating their profile. In HTML, the input control we should use is input="file". This is a file control provided by the browser vendor and it should be ran in a sandbox for security consideration. Browsers don't provide ways to choose file from local and upload to the remote server without the input="file" control. There is one annoying part about the input="file", which is a default button named "Choose File" or "Browser" will always appear when this control is created. Sometimes, to keep consistent and provide ...

46,358 3       HTML FILE BROWSE REMOVE BROWSE BUTTON


  When You Should Consider Moving From HTML to WordPress Platform?

No matter, you want to introduce big changes in your HTML website or a minor one, you'll have to make the edits in your site's files and then upload all of them by connecting to your FTP server. Now, this can be a pretty time-consuming and a daunting prospect for business owners who requires to make changes to the site on a regular basis. You should think about moving from your static HTML to some dynamic platform that provides you the flexibility to make the process of content editing become a breeze. But in case you're running a simple brochure page, then going through the hassle of switchin...

4,937 3       HTML TO WORDPRESS HTML TO WORDPRESS CONVERSION CONVERT HTML TO WORDPRESS


  HTML Email Guide

Many of us may subscribe to some newsletters to get update about their site or information about a topic such as JavaScript Weekly, we may receive an email every week or every month to know what's happening there.The email we receive is just a simple HTML page but with an Email format called HTML Email. It seems it's simple to write this kind of HTML Email. But the thing is it's not so easy. It takes much effort by just designing an Email template.Whether the HTML Email can be displayed normally depends completely on the mail client. Most mail clients such as Outlook and Gmail will filter the ...

12,749 0       HTML EMAIL GUIDE