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

 WEB


  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,679 2       HTML TARGET BLANK REL NOOPENER REL NOREFERRER


  The confusing strtotime() function in PHP

Frequently PHP programmers get confused of the use of i month, -1 month, next month in strtotime() function. and hence it leaves some impression to programmer that this function is not that reliable.Let's take one example of strtotime call with -1 month and see why it leaves this impression.date("Y-m-d",strtotime("-1 month"))  // Assume today is 2018-07-31What's the output of above call? The answer is 2018-07-01. Why not 2018-06-30? So people get confused. It appears that this is wrong at first glance, but if think again, this output is reasonable.Below is how the logic worksIt first...

9,864 0       PHP STRTOTIME FIRST DAY OF -1 MONTH


  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,922 2       IFRAME SECURITY X-FRAME-OPTIONS CONTENT-SECURITY-POLICY HTML HTTP


  Let’s Find Out What the Future holds for .Net Technology

Technology is more like an evolution, not a revolution. The disruptive industry seems to be changing day in day out. Due to which tech companies by default have to chase new trends in order to stay ahead of the curve. Now, Microsoft.Net framework has been around since the 1990s! Do you think such refined technology can be considered relevant now? From what I can see, .Net is going through a major transformation. It’s gone largely open source and has been getting modernized so that its workflow and feature set works better with what modern web developers are looking for. The following pos...

1,515 0       .NET ASP.NET


  Different ways to pass query parameters in EmberJS

In EmberJS, one could pass query parameters when retrieving resources with store.query() method. But what if there is a requirement that one wants to pass query parameters when calling store.findRecord()? Or there is a requirement that one wants to pass query parameters to a relationship when calling model.get('hasManyAttribute') in a RESTful style? In this post, we will explain how these can be achieved.In the store.query() case, one could easily pass the query parameters by passing a hash to the query method. An example looks like:store.query('someResource', { include: 'someDepend...

9,088 0       RELATIONSHIP QUERY PARAMETERS EMBERJS


  Can a === 1 && a === 2 && a === 3 be true in JavaScript?

Lots of you may be aware that there is famous interview question which asks whether a == 1 && a == 2 && a == 3 can be true in JavaScript. And the answer to this question is YES. The reason is that == will do a non-strict comparison which will evaluate a to a number and this provides the possibility of dynamically return the value when every time a is accessed.Have you ever wondered whether a === 1 && a === 2 && a === 3 can be true? At first glance, it seems this is impossible since === will do strict comparison and the type of the two sides must be the same befo...

5,246 2       JAVASCRIPT === STRICT COMPARISON


  Can a == true && a == false be true in JavaScript?

JavaScript is a weak typed language and it has a loose comparison feature where two objects/values of different type can be compared using == operator. This provides developers great flexibility and confusion at the same time. Before understanding how == works in JavaScript, can you first answer the question in the post title? Can a == true && a == false be true in JavaScript? Normally, we would think that this expression will always return false since a can be either true or false but cannot be both. However, in JavaScript, the above expression can return true indeed.If we h...

19,339 2       JAVASCRIPT COMPARISON INTERVIEW QUESTION ==


  6 Great Ways to Design Amazing PWA’s

Why PWA v/s Native Mobile apps a wrong question to ask. PWA has already gathered a lot of momentum recently and is structured to give “App like” experience to its user base. Reveal all the extra layers underneath and create magic with brand new ideas to design progressive web apps.What comes to your mind when you imagine leading a progressive life? Definitely, it is going to be far better than  the previous one. Progressive Web Apps (PWA’s) are going to work to outweigh the advantages brought in by the native mobile applications. PWA’s have enlarged the horizon and...

1,482 0       WEB DESIGN PROGRESSIVE WEB APPS PROGRESSIVE WEB APP TECHNOLOGY COMMON UI/UX MISTAKES