What is the difference between localStorage, sessionStorage, session and cookies?

This is an extremely broad scope question, and a lot of the pros/cons will be contextual to the situation. In all cases, these storage mechanisms will be specific to an individual browser on an individual computer/device. Any requirement to store data on an ongoing basis across sessions will need to involve your application server side … Read more

vertical-align with Bootstrap 3

This answer presents a hack, but I would highly recommend you to use flexbox (as stated in @Haschem answer), since it’s now supported everywhere. Demos link:– Bootstrap 3– Bootstrap 4 alpha 6 You still can use a custom class when you need it: Expand snippet Bootply Using inline-block adds extra space between blocks if you … Read more

Scraping data from website using vba

There are several ways of doing this. This is an answer that I write hoping that all the basics of Internet Explorer automation will be found when browsing for the keywords “scraping data from website”, but remember that nothing’s worth as your own research (if you don’t want to stick to pre-written codes that you’re … Read more

Why write script type=”text/javascript” when the mime type is set by the server?

Douglas Crockford says: type=”text/javascript” This attribute is optional. Since Netscape 2, the default programming language in all browsers has been JavaScript. In XHTML, this attribute is required and unnecessary. In HTML, it is better to leave it out. The browser knows what to do. He also says: W3C did not adopt the language attribute, favoring instead a type attribute … Read more

HTML input – name vs. id

In HTML4.01: Name Attribute Valid only on <a>, <form>, <iframe>, <img>, <map>, <input>, <select>, <textarea> Name does not have to be unique, and can be used to group elements together such as radio buttons & checkboxes Can not be referenced in URL, although as JavaScript and PHP can see the URL there are workarounds Is referenced in JavaScript with getElementsByName() Shares the same namespace as … Read more

Padding a table row

The trick is to give padding on the td elements, but make an exception for the first (yes, it’s hacky, but sometimes you have to play by the browser’s rules): First-child is relatively well supported: https://developer.mozilla.org/en-US/docs/CSS/:first-child You can use the same reasoning for the horizontal padding by using tr:first-child td. Alternatively, exclude the first column … Read more