#20561 closed enhancement (fixed)
Accelerating some js calls, and changing the check-point for another.
Reported by: | georgestephanis | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | minor | Version: | |
Component: | General | Keywords: | needs-patch |
Focuses: | Cc: |
Description
First change in the patch falls back from using jQuery to pure JS -- should be much quicker as it'll be loading frequently.
Second change lets us base it off of how the back-end calculates mobile, rather than just 'mobile' in the UA string. Should converge them to one test point, rather than dispersed ones.
Attachments (2)
Change History (8)
#3
@
12 years ago
- Keywords needs-patch added; has-patch removed
- It doesn't need to be global; just move it up one level in scope
- It should be faster than executing a .match() every time
#4
@
12 years ago
jQuery seems to cache the selectors anyways, not sure if this would make any difference. On the other hand it's a good practice to set things like this to a variable instead of running it every time.
BTW isn't this a duplicate of #20557?
Note: See
TracTickets for help on using
tickets.
Instead of dropping down to raw JS, why not cache it in a variable at the beginning? It's not like it will change.