background preloader

Divers

Facebook Twitter

XAMPP / WAMP / whatever it is: Apache is running super slow. Creating responsive images using the noscript tag | Head. When building responsive websites, you immediately run into the problem of trying to implement responsive images which would be sized correctly depending on the user's device. Either you want to hide images from mobile users or give them an optimised version. The problem centers on the page loading anything referenced in the HTML even if it’s hidden by CSS in your media queries. This can lead to your mobile users getting a big hit from content they aren’t even using. This problem can’t be handled entirely on the server side. You have to make contact with the user’s device before you can determine how much screen width is available.

We came across a couple of existing libraries. Using the Webkit developer tools, HTTPWatch for Internet explorer and HTTPfox for Firefox we were surprised to discover that removing the element with JavaScript prevented the request being made to the server. We created a Rails helper gem, responsive_image_tag, to insert the necessary markup into the page: 50 Online Tools to Convert Documents and Media Files | Technically Digital. Downloading a document only to find that you do not have the application to open it can be frustrating.

Thankfully however there are numerous web apps that help you out of this predicament. We have gathered 50 such online tools that help you convert not only digital documents but also images and various other media files. Read on to find the tools and see which ones suit your needs best. Audio/Video Converters KeepVid : KeepVid is an useful online utility which helps users download videos from different online streaming websites. CellSea : CellSea is another useful converter which can help users download, convert, crop and resize videos from different streaming websites. VideoDownloadX : With VideoDownloadX, users can convert and download videos from YouTube. GetYourVideo : With GetYourVideo, users can download videos from different online video streaming websites including DailyMotion, YouTube, Metacafe and many more.

Document Converters Image Converters Multi-Purpose Converters. Get Ratio. 10 useful .htaccess snippets to have in your toolbox. .htaccess, the file which control the Apache webserver, is very useful and allows you to do a lot of things. In this article, I have compiled 10 .htaccess snippets that any web developer should have in his toolbox. Before editing your .htaccess file, always make a backup so you can restore it if needed.

Remove www in url For SEO reasons, you might always remove (or use) the www prefix in your urls. The following snippet will remove the www from your website url and redirect any url with the www to the non-www version. RewriteEngine On RewriteCond %{HTTP_HOST} ! ^your-site.com$ [NC] RewriteRule ^(.*)$ [L,R=301] Source: Prevent hotlinking Hotlinking is a bad practice that consist of using the images from another site on yours. Source: Redirect all WordPress feeds to feedburner Most bloggers are using Feedburner, a web service that lets you know how many people are reading your blog via feeds. Create custom error pages. HTML5 History API - dynamic websites like never before - Web Species blog.

I have talked about this before, but JavaScript should not dictate content or website structure. It should only improve the UI, but even with JavaScript disabled website should work. Using the new HTML5 History API allows to do that one step further - making dynamic websites behave like normal ones. What is History API? History API is quite a simple concept - a JavaScript API you can use to control history state. With using History API you can add an entry to history stack once some dynamic content is loaded. All this behavior is very well explained in “Dive into HTML5” book, but in short when you load some content using Ajax or you move user to a place in a page which you want to have linkable - use History API. Of course like with most of the new HTML5 functionality, this is not supported in all browsers.

How to use it? There is only one main method: history.pushState(state, title, link); and one event: State example from Mozzila documentation: How I used it Conclusion. URL rewriting pour les nuls. Hello, C'est sans doute moi mais je n'ai pas trouvé de tutoriel pour les Rewrite Rules sur le site. Je vous propose donc le mien. Vous verrez c'est etonnament facile. Principe:L'url rewriting permet d'utiliser des urls toute simples au lieu d'url longues et complexes maPage-val1-val2-val3.html à la place de maPage.php? Vous devez vous meme modifier l'ecriture des URL DANS VOTRE CODE SOURCE. Avantages:Les bots suivront les liens simplifiés et indexeront votre site en profondeur. Inconvénients:Il faut un serveur à la hauteur - car cela consomme en ressource. Comment ca marche? RewriteEngine on RewriteRule \photo-([0-9]+)\.html$ /photo.php? Et réecrire vos liens dans vos pages. L'url rewriting décortiqué:D'abord il faut identifier les liens que vous allez réecrire: Comme je suis photographe j'ai un site qui gére des photos, des albums (appelés event) et des portfolios.

Portfolio.php? Dès que vous avez listé les URL vous devez concevoir le format des nlles URLs. . / debute la réécriture ex. Récupérer un podcast pour l'écouter en ligne. 8 fév. 2011 En utilisant PHP et JavaScript, nous pouvons récupérer à la volée dans un podcast les données nécessaires pour le mettre en écoute dans un module comme dewplayer (lecteur gratuit de mp3). Pour réaliser notre lecteur de podcast dynamique, il nous faut d'abord rendre le XML lisible, nous prenons en effet un flux extérieur au site dans lequel nous voulons afficher notre dewplayer.

Pour que cela fonctionne, il est indispensable que le serveur pense que ce fichier XML se trouve sur notre site. Il existe une parade en PHP pour le faire. Vous devez créer un fichier, par exemple podcast.php, et y mettre le code suivant : Pour cet exemple nous avons choisi un podcast de radiofrance. Maintenant si vous ouvrez en ligne votre fichier podcast.php il s'affichera avec le contenu XML du fichier extérieur hébergé sur radiofrance.

Pour la suite nous allons passer par jQuery. 1. avec l'extension jquery.jfeed.pack.js. 2. Code complet d'une page avec un podcast : The Collection. Htaccess : cache control et expire headers. Le htaccess est un fichier de configuration de votre serveur, et celui-ci peut vous rendre énormément service pour les performances de votre site, sur l’expérience utilisateur et sur le référencement naturel. Mais c’est un peu le flou sur la manière de le configurer. Si vous rencontrez des soucis avec ce code et que vous souhaitez que nos équipes se charge de l’adapter et de l’installer, faites appel à nos services de développement. Voici donc un guide pour coder votre fichier htaccess : Avant propos Testez, testez et testez !

Chaque code donné ici permet d’optimiser le fichier htaccess pour accélérer votre site, le sécuriser et réduire la bande passante utilisée. Mais en fonction de la configuration de votre serveur, les codes peuvent ne pas fonctionner : vous devez absolument tester et adapter chaque code en fonction de vos besoins ! Quelques définitions Pour mieux comprendre cet article, voici quelques explications. Htaccess : c’est un fichier de configuration pour un serveur web apache. Wibbitz : créez un diaporama à partir d’un flux RSS