Best way to use custom fonts on your site cross browser web fonts If you use custom font in your website using @font-face,then it may possible that it will not display fine in some browsers. This is due to the font-face browser dependency (every browser supports @font-face slightly differently). for resolving the cross…
Use non-standard font in web pages Normally your website visitors can only see the fonts that are already installed on their system. So if you use a font(non-standard) that is not installed on site visitor’s computer then his browser will show some other font that is on their computer. That’s why when you are…
PHP: Access control modifiers One of the fundamental principles in OOP(Object Oriented Programming) is ‘encapsulation‘. The idea is that you create cleaner and better code, if you restrict access to the data structures (properties) and methods in your objects. The access modifier is the most important feature of the OOP language and it…
What is the difference between htmlspecialchars and htmlentities PHP functions? htmlentities: This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities. htmlspecialchars: Some characters have special significance in HTML, and should be represented by HTML entities if they…
What is the difference between cookies and session? HTTP is a stateless protocol. That mean, that treats each request as an independent transaction that is unrelated to any previous request. So, how about the request we want to make frequently, like username or id? As you know, we could store our data in COOKIE.…
Complete guide of cookies and session in php SESSION Many New PHP developers are often confused whether to use sessions or cookies for their websites. Both cookies and sessions have their advantages and drawbacks. PHP developer should first understand the differences between each so that he can choose better option according to need.…