Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Tuesday, March 14, 2017

Cookieless Alternative To Embed HTML, CSS And JS Code Snippets

 Embedding code examples with third-party scripts often leads to tracking or cookies. We always wanted to have a simple website with a good UX, so setting cookies for no reason wasn’t an option for us. Now, with Indiepen, we are proud to introduce a privacy-friendly alternative.

When we implement websites today, we are confronted by a lot of things we need to take care of. Ideally, we want to have a fast, secure, accessible, and fair website. At the same time, we want to have an interactive website with comments, polls, videos, code examples, and many more.

Together with a friend, I launched a tech blog last year and we ran exactly into that issue. We wanted to have a simple solution to embedding HTML, CSS, and JavaScript code examples but existing solutions often include tracking, cookies, a ton of features or bad performance. After some research, we realized that we had to build an alternative.

Indiepen is a privacy-friendly, lightweight, and accessible solution to embed code examples. In fact, we don’t set any cookies or tracking!

Get Started

Indiepen can preview every website that follows a very simple convention. You need to provide a website with the following file structure:

.
├── index.html
├── main.js
└── styles.css

Deploy the code example with your favorite hosting provider (e.g. GitHub Pages, Netlify, or Vercel) and copy the URL. After that, go to start page and use the code snippet generator.

The generated code looks like this:

<iframe class="indiepen"
  src="https://indiepen.tech/embed/?url=https%3A%2F%2Findiepen.tech%2Fexample%2F&tab=result"
  style="width: 100%; overflow: hidden; display: block; border: 0;"
  title="Indiepen Embed"
  loading="lazy"
  width="100%"
  height="450">
</iframe>

You can now use the code snippet and integrate it on your website. That’s it! You should now see your code example with an editor to discover the code.

Under The Hood

It sounds a bit strange nowadays but we haven’t used any JavaScript framework like React or Vue.js. It’s pure HTML, CSS and JavaScript with some help from Lea Verou’s Prism.js for syntax highlighting. Those libraries are very helpful to implement and maintain complex web applications but in our case, we just have three files we need to fetch and pass onto Prism.js.

Additionally, we have three buttons in the upper right corner to switch between the HTML, CSS, and JavaScript views. By introducing a UI framework, we couldn’t deliver a lightweight solution with less than 20 kb in size. For us, it was good learning, that UI libraries are important in our day-to-day business but we should carefully consider them and don’t forget the good old vanilla JavaScript.

 

Final Words

Indiepen is our first open-source project and we are very excited to share our ideas with you. We would love to get feedback and have discussions about a fair web. Get in touch with me on Twitter or check out the project on GitHub.

Last but not least, I’d like to mention that Indiepen has a limited scope and we want to keep it simple by design. If you need to deal with more complex code examples, preprocessors for CSS or JavaScript, or you want to benefit from a platform to share your ideas, then please consider more sophisticated solutions like CodePen or JSFiddle.

Happy coding, everyone!

Monday, March 13, 2017

Q4 Headaches: The Wrong Way to Drop-Ship

 

Babies R Us advertises a bouncer on Black Friday for a mere $29. On Amazon, it’s selling for $98. It’s an amazing flip.

Your local store is out of inventory, but there is plenty available on the Babies R Us website. Just create an Amazon MFN listing, and have Babies R Us send the product to your buyer, right?

Wrong. The temptation may be tremendous. But don’t turn your Black Friday into a bust with dangerous drop-shipping.

Does Amazon allow drop-shipping?

First, let’s clarify what drop-shipping means. Drop-shipping is a fulfillment method where a third-party seller never sees nor touches the inventory. The third-party seller accepts an order from a customer, and then it triggers another company to fulfill the order.

Amazon allows certain kinds of drop-shipping. A third-party seller can establish a relationship with a vendor such as a manufacturer or distributor. That manufacturer or distributor can then drop-ship on behalf of the third-party seller. Amazon is totally cool with this arrangement, but only if your shipping statistics remain in the green.

There is another kind of drop-shipping that is specifically prohibited by Amazon. It’s called casual drop-shipping. Meaning, no real vendor relationship exists between the third-party seller and the shipper.

Consider the Babies R Us situation above. To fulfill that order, a third-party Amazon seller would put their buyer’s name in the “ship to” section of an order on the Babies R Us web site. The item would ship from the Babies R Us warehouse directly to the end-buyer.


Why informal drop-shipping can be dangerous:

  1. The item arrives in a Babies R Us box. Or it comes in a box from Target, Walmart or another retailer that competes with Amazon. This makes customers unhappy.
  2. The item typically includes an invoice with the actual price paid to Babies R Us. This makes customers angry, since they probably paid between two and four times that amount.
  3. The seller has absolutely no way of controlling product quality. Amazon expects you to ensure that the items you sell meet its stringent product quality standards. If you never see the inventory and have no formal relationship with the vendor, you have no say in quality.
  4. Larger items are often shipped without an outer carton. Shipping stickers are placed directly on the box, which is beaten up by the time it arrives. This does not live up to Amazon’s standards for third-party sellers.

What about doing drop-shipping the right way?

Drop-shipping with formal vendor arrangements can be an excellent sourcing method for some sellers. But just like anything else, it requires careful management and monitoring:

  1. Have a discussion with your vendor about product quality. Ensure they are only sending your customers items in gift-giving condition.
  2. Find out about your vendor’s packing protocols. If items need to be in a box, make sure they aren’t being shipped out in a padded envelope.
  3. Establish rules for fulfillment times. Carefully monitor your orders and make sure they are going out on time- every time.
  4. Require timely uploading of tracking numbers for each and every shipment.
  5. Whenever possible, automate the entire process, from order transmission to tracking number upload. This greatly reduces human error.