vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Safe to remove version numbers from .js? (https://vborg.vbsupport.ru/showthread.php?t=310958)

final kaoss 05-01-2014 09:06 PM

Safe to remove version numbers from .js?
 
Any ill effects from removing the version number from the javascripts?

Go to:
Admin cp
Styles & Templates > Open the box
Search in templates

Search for Text: .js?v={vb:raw vboptions.simpleversion}
Replace with Text: .js
Test Replacement Only
(This will show you the results of doing this find/replace, without actually updating the templates) Tick NO
Click find until it's done.

I'd like others to test this out on a test skin/site and report any ill effects from it, thanks! It can help to prevent others from seeing version numbers to an extent and help with page loading.

I've done this and this issue is resolved for pretty much all js that I've seen so far.
Remove query strings from static resources

tbworld 05-01-2014 09:25 PM

Since it is used for browser cache busting, I would just alter the SIMPLE_VERSION constant in 'class_core.php' to something less revealing. If you run multiple sites with different versions, I would not change the CONSTANT to the same name for obvious reasons.

final kaoss 05-01-2014 09:26 PM

Yeah it's kinda too late for that with my skin, I told it to do it for only one but it did it for every skin :). Would it break any js from working though?

tbworld 05-01-2014 09:31 PM

Quote:

Originally Posted by final kaoss (Post 2495743)
Yeah it's kinda too late for that with my skin, would it break any js from working though?

Not that I am aware of.

It does not mean that some MOD out there is not using it for some odd reason, but I kind of doubt it. Most people are unaware what it is even for.

--------------- Added 01 May 2014 at 15:45 ---------------

Quote:

Originally Posted by final kaoss (Post 2495743)
Yeah it's kinda too late for that with my skin, I told it to do it for only one but it did it for every skin :). Would it break any js from working though?

This really will not hide the version number from too many people. Since they can view it in the JavaScript files. You would have to strip the version number from many of the JavaScript files. I am not sure if that would violate the licensing agreement with vBulletin.

Zachery 05-01-2014 09:51 PM

Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources:
Does this impact your servers? If not, why do you care?

K4GAP 05-02-2014 06:09 AM

Quote:

Originally Posted by final kaoss (Post 2495743)
Yeah it's kinda too late for that with my skin, I told it to do it for only one but it did it for every skin :). Would it break any js from working though?

Has it affected anything that you can see? If not then you answered your own question. If it works fine for you then it ain't broke. If it ain't broke it don't need fixed.


All times are GMT. The time now is 10:42 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00991 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete