+ 23
Break free from CSS prefix hell!
A script that lets you use only unprefixed CSS properties everywhere. It works behind the scenes, adding the current browser’s prefix to any CSS code, only when it’s needed. Add this script in HTML section. <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
15 ответов
+ 21
Thanks for the info.
Let's hope all lazy people include this script if not WebKit prefix for android 4.4 or less.
+ 17
Thanks for the info😊😊
+ 15
Here is an example
https://code.sololearn.com/W92S1VXC4LaL/?ref=app
+ 15
@Sun Tzu
it's open source. if you don't trust it. just roll the latest version from Github on your own.
https://github.com/LeaVerou/prefixfree/blob/gh-pages/prefixfree.min.js
https://github.com/LeaVerou/prefixfree/blob/gh-pages/prefixfree.js
https://github.com/LeaVerou/prefixfree/blob/gh-pages/README.md
https://github.com/LeaVerou/prefixfree?files=1
+ 13
Thanks for this.
+ 13
@Sun Tzu
Either you speedup page load or miss on some visitors.
using CDN is not laziness there are benefits to it.
about the security risks. they can be reduced by using a trusted CDN like google, using SRI.
you can even make sure the resource was not tampered by checking it's integrity & cancel the script load.
# the second answer says it better #
https://security.stackexchange.com/questions/16797/what-are-the-security-risks-when-using-free-content-delivery-networks-cdns
https://stackoverflow.com/questions/3489344/how-secure-are-cdns-for-delivering-jquery
+ 11
@Sun Tzu
according to your logic we shouldn't use any external library in our code because the owner of these library can change the source code any time.
This way these things doesn't work. If they change something in the source code, they will release another version leaving the previous one intact.
+ 10
Thanks man
+ 9
nice job 😁👍👌
+ 5
Thanks for sharing this! ☺
+ 4
Thanks it will help a lot of people
+ 4
I'm seeing a useful reason why I should and an argument why I shouldn't. I really want to.... Tzu brought up a good point.
+ 3
NO - NO - NO : DO NOT RUN THIS .
Importing javascript using an external link is never done because it's a huge security risk. The person running that website could change the code at any point to exploit your website and it's users.
If you want to use the code, then download it to your computer, make sure the code is clean, and then upload the script to your own server.
Edit: I'm seeing now that the original poster is a well standing community member. Still, he should know better. Don't uses the html code he gave you.
+ 3
Thank for the information
+ 3
@Lord Krishna If the host website gets compromised (be it GitHub or whatever) then every server linking to that script can be compromised.
If you're running this on a live website, you've given hackers another way in, and for what? Because you don't want to copy a file? Do whatever you want , idc.