Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Html5Shiv Laravel Package

afarkas/html5shiv

HTML5 Shiv enables HTML5 elements and basic styling support in older versions of Internet Explorer by creating missing elements and adding needed shims. A lightweight drop-in script for legacy browser compatibility with modern HTML markup.

View on GitHub
Deep Wiki
Context7

This script is the defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer.

Frequently asked questions about Html5Shiv
How do I install afarkas/html5shiv in a Laravel project?
Since this is a frontend-only package, you don’t install it via Composer. Download the script directly from the [GitHub repo](https://github.com/aFarkas/html5shiv) and include it in your Blade layouts or asset pipeline. For Laravel Mix/Vite, add it to your JS entry file or bundle it manually.
Does afarkas/html5shiv work with Laravel Blade templates?
Yes, include the script in your Blade layouts using a `<script>` tag in the `<head>` or `<body>`. For reusable layouts, place it in a shared partial (e.g., `@extends('layouts.app')` with the script in the parent layout). Use `@stack('scripts')` if you need conditional loading.
Will this package break modern browsers like Chrome or Firefox?
No, the script is designed to only activate in Internet Explorer 8 and below. Modern browsers ignore it entirely, so there’s no risk of conflicts. However, test in your target browsers to confirm no unintended side effects occur.
Is afarkas/html5shiv compatible with Laravel 10 and newer?
The package itself has no Laravel dependencies, so it works with any Laravel version. However, its last update was in 2015, so ensure your frontend build tools (e.g., Vite, Webpack) can handle the script without ES6+ compatibility issues. Test thoroughly in your environment.
Can I conditionally load this script only for IE8 and below?
Yes, use feature detection or user-agent sniffing to load the script only for legacy IE. In Blade, you could use `@if(request()->userAgent() === 'Trident' || request()->userAgent() === 'MSIE')` or a frontend library like Modernizr for more robust detection.
Are there security risks using this abandoned package?
Since the package is static JavaScript with no server-side execution, the primary risk is outdated dependencies or conflicts with modern CSP policies. Audit the script for inline scripts or external CDN issues. Consider hosting it locally to avoid CDN vulnerabilities.
Does afarkas/html5shiv support Laravel’s asset optimization (Mix/Vite)?
Yes, you can bundle the script into your main JS file using Laravel Mix or Vite. Add the raw script to your `resources/js/app.js` or equivalent, then compile it. This reduces HTTP requests but may increase initial load time slightly.
What are modern alternatives to afarkas/html5shiv for IE support?
For IE11 and below, consider server-side rendering (SSR) fallbacks, feature detection with graceful degradation, or frameworks like Polyfill.io. For IE8, evaluate whether support is worth the maintenance cost—modern alternatives like EdgeLegacy or custom polyfills may be more sustainable.
How do I test if afarkas/html5shiv works in my Laravel app?
Use browser automation tools like Selenium or BrowserStack to test IE8-11. Verify HTML5 elements render correctly and styles apply. Check for JavaScript errors in the console. For Laravel, ensure the script loads before DOM parsing by placing it in the `<head>` or using `defer`.
Will this package work with Laravel’s Content Security Policy (CSP)?
Potential CSP issues may arise if the script uses inline styles or external resources. If loading from a CDN, ensure the domain is whitelisted. For local hosting, include the script via a trusted source. Test your CSP headers with the script enabled to confirm no violations occur.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
phalcon/cli-options-parser
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
directorytree/privacy-filter-classifier
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata